add custom css and add admin button to menu when user is admin

This commit is contained in:
2025-09-05 23:49:04 +02:00
parent 42e439aba5
commit 2fadc37ffe
5 changed files with 34 additions and 31 deletions

View File

@@ -1,17 +0,0 @@
<?php
namespace App\Filament\User\Widgets;
use Filament\Widgets\Widget;
class AdminLinkWidget extends Widget
{
protected static ?int $sort = 2;
protected static string $view = 'filament.user.widgets.admin-link-widget';
public function shouldRender(): bool
{
return auth()->user() && auth()->user()->role === 'admin';
}
}