view.blade.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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/roles')}}" class="breadcrumb-item"> Roles</a>
  12. <span class="breadcrumb-item active">View</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="table-responsive">
  22. <table class="table">
  23. <tbody>
  24. <tr>
  25. <td class="font-weight-bold">Name:</td>
  26. <td>{{ $role->name }}</td>
  27. </tr>
  28. <tr>
  29. <td class="font-weight-bold">Permissions:</td>
  30. <td>
  31. <ul>
  32. @foreach($permissions as $key=>$row)
  33. @if(count($row['childs']) > 0)
  34. <li>{{ $row['parent']->display_name }}</li>
  35. <ul>
  36. @foreach($row['childs'] as $child)
  37. <li>{{$child->display_name}}</li>
  38. @endforeach
  39. </ul>
  40. @else
  41. <li>{{ $row['parent']->display_name }}</li>
  42. @endif
  43. @endforeach
  44. </ul>
  45. </td>
  46. </tr>
  47. <tr>
  48. <td class="font-weight-bold">Created at:</td>
  49. <td>{{date('F j, y h:i a', strtotime($role->created_at))}}</td>
  50. </tr>
  51. </tbody>
  52. </table>
  53. </div>
  54. </div>
  55. </div>
  56. <!-- /content area -->
  57. @endsection
  58. @push('scripts')
  59. @endpush