@extends('admin.layouts.master') @section('title', 'Manage Permissions') @section('css') @endsection @section('content') {{-- Header --}}

Permissions

Manage all route permissions grouped by prefix

Sync Routes
{{-- Stats --}} @php $allPerms = collect($permissions)->flatten(); $totalPerms = $allPerms->count(); $totalGroups = collect($permissions)->count(); $showable = $allPerms->where('isShowable', 1)->count(); $getRoutes = $allPerms->where('isGet', 'GET')->count(); @endphp
{{ $totalPerms }}
Total
{{ $showable }}
Visible
{{ $totalGroups }}
Groups
{{ $getRoutes }}
GET Routes
{{-- Main Card --}}
{{-- Toolbar --}}
{{-- Permission Groups --}}
@foreach($permissions as $prefix => $permissionList) @php $visibleCount = count($permissionList); $showableCount = collect($permissionList)->where('isShowable', 1)->count(); @endphp
{{-- Group Header --}}
{{ ucfirst($prefix) }} {{ $visibleCount }}
{{-- Group Body --}}
@foreach($permissionList as $permission) @php $routeInfo = $routeList->firstWhere('name', $permission->route); $isGet = $routeInfo['isGet'] ?? 0; $isShowable = $routeInfo['isShowable'] ?? 0; $path = $routeInfo['path'] ?? ''; $status = $permission->isShowable == 1; $disableShow = strpos($permission->url, '?') !== false || strpos($permission->url, '=') !== false || strpos($permission->url, '{') !== false || strpos($permission->url, '}') !== false || $permission->isGet !== 'GET'; $methodClass = match(strtoupper($permission->isGet)) { 'GET' => 'pm-method-get', 'POST' => 'pm-method-post', 'PUT','PATCH' => 'pm-method-put', 'DELETE' => 'pm-method-del', default => '', }; @endphp @endforeach
ID Display Name Route URL Method Visible Edit
{{ $permission->id }} {{ $permission->display_name }} {{ $permission->route }} {{ $permission->url }} {{ $permission->isGet }}
@endforeach {{-- No results --}}

No permissions match your search

{{-- Edit Permission Modal --}} @endsection @section('js') @endsection