/
home
/
sjslayjy
/
public_html
/
mosaram
/
resources
/
views
/
Upload File
HOME
@extends('master') @section('content') <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <style type="text/css"> .label{ font-size: 10px; } </style> <div class="container content-box pad25A" style="page-break-after: always;"> <!-- start model --> <div class="container"> <button type="button" class="btn btn-success mb-2" data-toggle="modal" data-target="#form"> Add Users </button> <br/> </div> <div class="modal fade" id="form" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-header border-bottom-0"> <h5 class="modal-title" id="exampleModalLabel">Add Users</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <form action="{{url('/adduser')}}" method="post"> {{ csrf_field() }} <div class="modal-body"> <div class="form-group"> <label class="label" for="name" style="font-size: 13px;">Name</label> <input type="text" class="form-control" id="name" name="name" placeholder="Enter name"> </div> <div class="form-group"> <label for="address" style="font-size: 13px;">Address</label> <input type="text" class="form-control" id="address" name="address" placeholder="Enter Address"> </div> <div class="form-group"> <label for="text" style="font-size: 13px;">lat No.</label> <input type="text" class="form-control" id="lat" name="lat" placeholder="Enter lat No."> </div> <div class="form-group"> <label for="lng" style="font-size: 13px;">lng No.</label> <input type="text" class="form-control" id="lng" name="lng" placeholder="Enter lng No."> </div> </div> <div class="modal-footer d-flex justify-content-center"> <button type="submit" class="btn btn-success form-control">Submit</button> </div> </form> </div> </div> </div> <!-- end model --> <div class="row"> <div class="col-12"> <table class="table table-bordered" id="datatbl"> <thead> <tr> <th scope="col">Sr.</th> <th scope="col">Name</th> <th scope="col">Actions</th> </tr> </thead> <tbody> @foreach($userlocation as $ul) <tr> <td>{{$ul->id}}</td> <td>{{$ul->name}}</td> <td><a href="javascript:void(0)" onclick="edituser({{$ul->id}})" class="btn btn-info">Edit</a> <!-- <a href ='delete/{{ $ul->id}}'>Delete</a> --> <a href="javascript:void(0)" class="deleteProduct btn btn-danger" data-token="{{ csrf_token() }}" onclick="deluser({{$ul->id}})" >Delete</a> </td> </tr> @endforeach </tbody> </table> </div> </div> </div> <script type="text/javascript"> function deluser(id){ if(confirm("Do you really want to delete this record")) { $.ajax({ url:'adduser/'+id, type:'get', data:{ _token:$("input[name=_token]").val() }, success:function(response) { $('#id'+id).remove(); } }); } } </script> @endsection