47 lines
1.2 KiB
PHP
47 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Providers;
|
|
|
|
use App\Filament\Resources\Providers\Pages\ListProviders;
|
|
use App\Filament\Resources\Providers\Schemas\ProviderForm;
|
|
use App\Filament\Resources\Providers\Tables\ProvidersTable;
|
|
use App\Models\Provider;
|
|
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 = 23;
|
|
|
|
protected static string|\BackedEnum|null $navigationIcon = 'lucide-arrow-down-up';
|
|
|
|
protected static ?string $recordTitleAttribute = 'name';
|
|
|
|
protected static string|\UnitEnum|null $navigationGroup = 'Administration';
|
|
|
|
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();
|
|
}
|
|
}
|