@extends('layouts.app') {{-- Important Variables --}} @section('title') {{ $moduleName }}->{{ $createItemName }} @stop @section('top-bar') @include('includes.top-bar') @stop @section('left-sidebar') @include('includes.recovery-left-sidebar') @stop @section('content')

{{ $createItemName }}


{{-- User Permissions Form Start --}}
{{ csrf_field() }}
{{-- Role Manage Name --}}
{{-- Permissions Table Start --}}
{{-- Select all check boxes in the form --}} @php $count = 1; function genChild($colName, $roleName, $childs, $index, $userPerms) { $checked = $userPerms && $userPerms[$roleName][$index] ? 'checked' : ''; foreach ($childs as $perm_name) { if ($perm_name === $colName) { $checkBox = "
"; return $checkBox; } } } function genRolesSubChilds($role_name, $column, $userPerms = null) { $permissionChildArray = [ 'All' => 1, 'Show' => 2, 'Create' => 3, 'Edit' => 4, 'Delete' => 5, 'Pdf' => 6, 'TrashShow' => 7, 'Restore' => 8, 'PermanentlyDelete' => 9, ]; foreach ($permissionChildArray as $colname => $value) { echo ''; } } @endphp @foreach ($allRolePermissions as $role_name => $column) {{-- Select All Check Box --}} {{-- Serial Number --}} {{-- Role Name --}} {{-- Role Sub Childs --}} @php genRolesSubChilds($role_name, $column, $userPermissions); @endphp @endforeach
S.L Module Name All Show Create Edit Delete PDF Trash Show Restore Permanently Delete
', genChild($colname, $role_name, $column, $value, $userPerms), '
{{ $count++ }} @php echo $roleNameCaps = ucwords(implode(' ', preg_split('/(?=[A-Z])/', $role_name))); @endphp
S.L Module Name All Show Create Edit Delete PDF Trash Show Restore Permanently Delete
{{-- Permissions Table END --}}
{{-- User Permissions Form End --}}
@stop @push('include-css') @endpush @push('include-js') @endpush