Skip to content

Commit

Permalink
shouldRegisterNavigation is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
OrhanOzey committed Dec 26, 2023
1 parent cf942ba commit 9cccc49
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Filament/Resources/ScheduleResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
use Illuminate\Database\Eloquent\SoftDeletingScope;
use Illuminate\Support\Collection;
use Illuminate\Support\HtmlString;
use App\Models\Admin;
use Illuminate\Support\Facades\Auth;

class ScheduleResource extends Resource
{
Expand All @@ -31,6 +33,11 @@ class ScheduleResource extends Resource

public static Collection $commands;

protected static function shouldRegisterNavigation(): bool
{
$admin = Admin::find(Auth::id());
return $admin->isSuperAdmin;
}

public static function getModel(): string
{
Expand Down

0 comments on commit 9cccc49

Please sign in to comment.