@extends('backend.layouts.app') @section('title', \App\Http\Helpers\MenuHelper::getPageTitle()) @push('styles') @endpush @section('content')

Total Permissions

{{ $stats['total'] }}

Generated

{{ $stats['generated'] }}

Missing

{{ $stats['missing'] }}

Generate New Permission

Select a model and actions to create permissions automatically.

@csrf

Permissions will be prefixed using the model route prefix.

Optional. Leave empty to create permissions without role assignment.

@php $actionMeta = [ 'view' => ['color' => 'blue', 'icon' => 'M15 12a3 3 0 11-6 0 3 3 0 016 0z M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z'], 'create' => ['color' => 'green', 'icon' => 'M12 4v16m8-8H4'], 'update' => ['color' => 'yellow', 'icon' => 'M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z'], 'delete' => ['color' => 'red', 'icon' => 'M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16'], ]; @endphp @foreach ($actionMeta as $action => $meta) @php($checked = in_array($action, old('actions', ['view', 'create', 'update', 'delete']), true)) @endforeach
@forelse($permissions as $index => $perm) @empty @endforelse
# Permission Module Action Status
{{ ($paginator->currentPage() - 1) * $paginator->perPage() + $index + 1 }} {{ $perm['permission'] }} {{ $perm['module'] }} {{ ucfirst($perm['action']) }} @if($perm['generated']) Generated @else Missing @endif

No permissions found

No permissions match your search criteria.

{{ $paginator->appends(request()->query())->links('vendor.pagination.custom') }}
@endsection @push('scripts') @endpush