feat: add UserResource with is_admin toggle and delete
User management resource with editable is_admin field, postcode support, admin filter, and inline delete action. Includes list and edit pages. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
35
app/Filament/NavigationGroup.php
Normal file
35
app/Filament/NavigationGroup.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament;
|
||||
|
||||
use BackedEnum;
|
||||
use Filament\Support\Contracts\HasIcon;
|
||||
use Filament\Support\Contracts\HasLabel;
|
||||
use Illuminate\Contracts\Support\Htmlable;
|
||||
|
||||
enum NavigationGroup implements HasIcon, HasLabel
|
||||
{
|
||||
case Users;
|
||||
|
||||
case Data;
|
||||
|
||||
case System;
|
||||
|
||||
public function getLabel(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Users => 'Users',
|
||||
self::Data => 'Data',
|
||||
self::System => 'System',
|
||||
};
|
||||
}
|
||||
|
||||
public function getIcon(): string|BackedEnum|Htmlable|null
|
||||
{
|
||||
return match ($this) {
|
||||
self::Users => 'heroicon-o-users',
|
||||
self::Data => 'heroicon-o-circle-stack',
|
||||
self::System => 'heroicon-o-cog-6-tooth',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user