move all into clusters
This commit is contained in:
1 parent
7ff3fbadb6
commit
a980ea92ce
91 files changed
+300
-262
No files matched your search
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Clusters\User\Resources\Users;
|
||||
|
||||
use App\Filament\Clusters\User\Resources\Users\Pages\ListUsers;
|
||||
use App\Filament\Clusters\User\Resources\Users\Schemas\UserForm;
|
||||
use App\Filament\Clusters\User\Resources\Users\Tables\UsersTable;
|
||||
use App\Filament\Clusters\User\UserCluster;
|
||||
use App\Models\User;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class UserResource extends Resource
|
||||
{
|
||||
protected static ?string $model = User::class;
|
||||
|
||||
protected static ?int $navigationSort = 1;
|
||||
|
||||
protected static string|\BackedEnum|null $navigationIcon = 'phosphor-user';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'name';
|
||||
|
||||
protected static ?string $cluster = UserCluster::class;
|
||||
|
||||
protected static string|\UnitEnum|null $navigationGroup = 'User';
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return UserForm::configure($schema);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return UsersTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListUsers::route('/'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
return parent::getEloquentQuery()->count();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user