Commit bc24f0d3 authored by Mahmoud Aglan's avatar Mahmoud Aglan

Fix PermissionService::applyScope() called statically on non-static method

Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 871df007
......@@ -66,7 +66,7 @@ public function render()
$query = Employee::with(['person', 'branch'])
->latest();
$query = PermissionService::applyScope($query, auth()->user(), 'employees.list');
$query = app(PermissionService::class)->applyScope($query, auth()->user(), 'employees.list');
if ($this->search) {
$search = $this->search;
......
......@@ -47,7 +47,7 @@ public function render()
$query = Trainer::with(['employee.person', 'employee.branch'])
->latest();
$query = PermissionService::applyScope($query, auth()->user(), 'trainers.list');
$query = app(PermissionService::class)->applyScope($query, auth()->user(), 'trainers.list');
if ($this->search) {
$search = $this->search;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment