@extends('layouts.admin') @php $isEditingPermission = !is_null(old('target_id', $selectedTargetId)); $permissionVerb = $isEditingPermission ? 'Edit' : 'Create'; @endphp @section('title', $permissionVerb . ' Permission') @section('page-title', $permissionVerb . ' Permission') @section('content')
@csrf
@if(($supportsAdminUserOverride ?? false) === true)
@else @endif
@php $currentPermissions = (array) old('permissions', $selectedPermissions); $customerVisibleActions = array_values(array_filter( $customerActions, function (array $action) use ($customerModules, $customerSpecial): bool { $actionKey = $action['key'] ?? null; if (!is_string($actionKey) || trim($actionKey) === '') { return false; } foreach ($customerModules as $module) { if (data_get($module, 'perms.' . $actionKey)) { return true; } } foreach ($customerSpecial as $row) { if (data_get($row, 'perms.' . $actionKey)) { return true; } } return false; } )); @endphp @if(($supportsAdminPermissions ?? false) !== true)
Per-user admin permissions are not available because the users.admin_permissions column is missing. Run migrations to enable this feature.
@endif
@foreach($actions as $action) @endforeach @foreach($modules as $module) @foreach($actions as $action) @php $perm = $module['key'] . '.' . $action['key']; @endphp @endforeach @endforeach @if(!empty($special)) @foreach($special as $item) @foreach($actions as $action) @endforeach @endforeach @endif
Module
{{ $action['label'] }}
{{ $module['label'] }}
{{ $item['label'] }} @if($loop->first) @endif
Back {{ $isEditingPermission ? 'Save' : 'Create' }}
@endsection