49 lines
1.4 KiB
PHP
49 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\ElementProviders;
|
|
|
|
use App\Filament\Clusters\Administrator\AdministratorCluster;
|
|
use App\Filament\Resources\ElementProviders\Pages\ListElementProviders;
|
|
use App\Filament\Resources\ElementProviders\Schemas\ElementProviderForm;
|
|
use App\Filament\Resources\ElementProviders\Tables\ElementProvidersTable;
|
|
use App\Models\ElementProvider;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Tables\Table;
|
|
use UnitEnum;
|
|
|
|
class ElementProviderResource extends Resource
|
|
{
|
|
protected static ?string $model = ElementProvider::class;
|
|
|
|
protected static string|\BackedEnum|null $navigationIcon = 'phosphor-folder';
|
|
|
|
protected static ?string $recordTitleAttribute = 'name';
|
|
|
|
protected static ?string $cluster = AdministratorCluster::class;
|
|
|
|
protected static string|UnitEnum|null $navigationGroup = 'Dynamic Data';
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return ElementProviderForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return ElementProvidersTable::configure($table);
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListElementProviders::route('/'),
|
|
];
|
|
}
|
|
|
|
public static function getNavigationBadge(): ?string
|
|
{
|
|
return parent::getEloquentQuery()->count();
|
|
}
|
|
}
|