52 lines
1.3 KiB
PHP
52 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Projects;
|
|
|
|
use App\Filament\Resources\Projects\Pages\ListProjects;
|
|
use App\Filament\Resources\Projects\Pages\ViewProject;
|
|
use App\Filament\Resources\Projects\Schemas\ProjectInfolist;
|
|
use App\Filament\Resources\Projects\Tables\ProjectsTable;
|
|
use App\Models\Project;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Support\Icons\Heroicon;
|
|
use Filament\Tables\Table;
|
|
|
|
class ProjectResource extends Resource
|
|
{
|
|
protected static ?string $model = Project::class;
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedGlobeAlt;
|
|
|
|
public static function getNavigationLabel(): string
|
|
{
|
|
return __('ui.projects');
|
|
}
|
|
|
|
public static function getModelLabel(): string
|
|
{
|
|
return __('resources.project');
|
|
}
|
|
|
|
public static function getPluralModelLabel(): string
|
|
{
|
|
return __('ui.projects');
|
|
}
|
|
|
|
public static function infolist(Schema $schema): Schema
|
|
{
|
|
return ProjectInfolist::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return ProjectsTable::configure($table);
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return ['index' => ListProjects::route('/'), 'view' => ViewProject::route('/{record}')];
|
|
}
|
|
}
|