@section('title', 'Permission') @extends('admin.layouts.app') @push('style') @endpush @section('content') Krushley Manage Sub-Admin Permission arrow_back @csrf @php $permissions = $sub_admin->getPermissions($sub_admin->id); @endphp @foreach ($menus as $menu) {{str_replace("List"," ", $menu->manager_name)}} @if (!empty($menu->routes)) @php $checked = ''; if( isset($permissions[$menu->id]) && ($permissions[$menu->id] == $menu->routes) ){ $checked = 'checked="checked"'; } @endphp {{$menu->manager_name}} @endif @foreach ($menu->getChildMenus($menu->id) as $key => $value) @php $checked = ''; if (isset($permissions[$value->id]) && ($permissions[$value->id] == $value->routes)) { $checked = 'checked="checked"'; } @endphp {{$value->manager_name}} @if ($value->getChildMenus($value->id)->count() > 0) @foreach ($value->getChildMenus($value->id) as $subKey => $subValue) @php $subChecked = ''; if (isset($permissions[$subValue->id]) && ($permissions[$subValue->id] == $subValue->routes)) { $subChecked = 'checked="checked"'; } @endphp {{$subValue->manager_name}} @endforeach @endif @endforeach @endforeach Save @endsection @push('script') @endpush