Files
nuhodds_fi4/app/Filament/Clusters/Grapper/Resources/Providers/ProviderResource.php
T
2026-03-04 19:07:33 +01:00

51 lines
1.4 KiB
PHP

<?php
namespace App\Filament\Clusters\Grapper\Resources\Providers;
use App\Filament\Clusters\Grapper\GrapperCluster;
use App\Filament\Clusters\Grapper\Resources\Providers\Pages\ListProviders;
use App\Filament\Clusters\Grapper\Resources\Providers\Schemas\ProviderForm;
use App\Filament\Clusters\Grapper\Resources\Providers\Tables\ProvidersTable;
use App\Models\Provider;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Tables\Table;
class ProviderResource extends Resource
{
protected static ?string $model = Provider::class;
protected static ?int $navigationSort = 2;
protected static string|BackedEnum|null $navigationIcon = 'phosphor-books';
protected static ?string $recordTitleAttribute = 'name';
protected static ?string $cluster = GrapperCluster::class;
protected static string|\UnitEnum|null $navigationGroup = 'Grapper';
public static function form(Schema $schema): Schema
{
return ProviderForm::configure($schema);
}
public static function table(Table $table): Table
{
return ProvidersTable::configure($table);
}
public static function getPages(): array
{
return [
'index' => ListProviders::route('/'),
];
}
public static function getNavigationBadge(): ?string
{
return parent::getEloquentQuery()->count();
}
}