edit.blade.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. @extends('admin.layout.index')
  2. @push('css-head')
  3. @endpush
  4. @section('content')
  5. <!-- Page header -->
  6. <div class="page-header page-header-light">
  7. <div class="breadcrumb-line breadcrumb-line-light header-elements-md-inline">
  8. <div class="d-flex">
  9. <div class="breadcrumb">
  10. <a href="{{url('/admin')}}" class="breadcrumb-item"><i class="icon-home2 mr-2"></i> Dashboard</a>
  11. <a href="{{url('/admin/permissions')}}" class="breadcrumb-item"> Permissions</a>
  12. <span class="breadcrumb-item active">Update: {{$permission->name}}</span>
  13. </div>
  14. </div>
  15. </div>
  16. </div>
  17. <!-- /page header -->
  18. <!-- Content area -->
  19. <div class="content">
  20. <div class="card">
  21. <div class="card-body">
  22. @if (count($errors) > 0)
  23. <div class="alert alert-danger alert-no-border alert-txt-colored alert-close alert-dismissible fade show" role="alert">
  24. <button type="button" class="close" data-dismiss="alert" aria-label="Close">
  25. <span aria-hidden="true">×</span>
  26. </button>
  27. <strong>Whoops!</strong> There were some problems with your input.
  28. <ul>
  29. @foreach ($errors->all() as $error)
  30. <li>{{ $error }}</li>
  31. @endforeach
  32. </ul>
  33. </div>
  34. @endif
  35. {!!Form::model($permission,['method'=>'PETCH','url'=>['admin/permissions/update',$permission->id]])!!}
  36. <div class="form-group">
  37. <label>Name:</label>
  38. <input type="text" class="form-control" name="name" value="{{$permission->display_name}}" id="name" placeholder="Name" required="">
  39. </div>
  40. <div class="form-group">
  41. <label>Parent:</label>
  42. <select class="form-control" name="parent">
  43. <option disabled="" selected="" value="">Choose One..</option>
  44. @foreach($parents as $row)
  45. <option value="{{$row->id}}" @if($row->id == $permission->parent) {{'selected'}} @endif>{{$row->display_name}}</option>
  46. @endforeach
  47. </select>
  48. </div>
  49. <div class="text-right">
  50. <a href="{{ url('admin/permissions/edit') }}/{{ $permission->id }}" class="btn btn-secondary pull-left">
  51. Refresh
  52. <i class="icon-reload-alt ml-2"></i>
  53. </a>
  54. <button type="submit" class="btn btn-primary">Update <i class="icon-pencil7 ml-2"></i></button>
  55. </div>
  56. {!! Form::close() !!}
  57. </div>
  58. </div>
  59. </div>
  60. <!-- /content area -->
  61. @endsection
  62. @push('scripts')
  63. @endpush