설명 없음
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

update.blade.php 3.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. @extends('admin.layouts.app')
  2. @section('content')
  3. <div class="row px-5">
  4. <div class="col-xl-12">
  5. <div class="card shadow">
  6. <div class="card-header bg-transparent">
  7. <div class="row align-items-center">
  8. <div class="col">
  9. <h6 class="text-uppercase text-muted ls-1 mb-1">Add User Management</h6>
  10. <h2 class="mb-0">Add Role Management</h2>
  11. </div>
  12. </div>
  13. </div>
  14. <div class="card-body">
  15. <form action="{{ route($route.'update_action') }}" class="form-global-handle" method="POST" enctype="multipart/form-data">
  16. @csrf
  17. <input type="hidden" name="id" value="{{ Hashids::encode($data->id) }}">
  18. <div class="form-group">
  19. <label for="RoleName">Role Name</label>
  20. <input type="text" name="name" value="{{ $data->name }}" class="form-control" id="RoleName" placeholder="Example : Admin">
  21. </div>
  22. <div class="form-group">
  23. <label> List Permission</label>
  24. <div class="row">
  25. @foreach ($permission as $key => $value)
  26. <div class="col-lg-4">
  27. <div class="card mr-2 my-2 p-3">
  28. @foreach ($value as $key_value => $value_data)
  29. <div class="custom-control custom-control-alternative custom-checkbox mb-3">
  30. <input class="custom-control-input" name="permission_id[]" value="{{ $value_data->id }}" id="customCheck{{$key.$key_value}}" {{ in_array($value_data->id, $data->permission) ? 'checked' : null }} type="checkbox">
  31. <label class="custom-control-label" for="customCheck{{$key.$key_value}}">{{ $value_data->name }}</label>
  32. </div>
  33. @endforeach
  34. </div>
  35. </div>
  36. @endforeach
  37. </div>
  38. </div>
  39. <div class="group">
  40. <button type="submit" class="btn btn-success">Simpan</button>
  41. <a class="btn btn-default bg-back" href="{{ route($route.'index') }}">Kembali</a>
  42. </div>
  43. </form>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. @endsection
  49. {{-- load JS yang lu perluin, selain itu no --}}
  50. @push('js')
  51. <script src="{{ asset('assets') }}/js/blockUI.js"></script>
  52. <script src="{{ asset('assets') }}/js/sweetalert2.js"></script>
  53. <script src="{{ asset('assets') }}/js/custom.js"></script>
  54. @endpush