58 lines
1.5 KiB
PHP
58 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Documents;
|
|
|
|
use App\Filament\Resources\Documents\Pages\CreateDocument;
|
|
use App\Filament\Resources\Documents\Pages\EditDocument;
|
|
use App\Filament\Resources\Documents\Pages\ListDocuments;
|
|
use App\Filament\Resources\Documents\Schemas\DocumentForm;
|
|
use App\Filament\Resources\Documents\Tables\DocumentsTable;
|
|
use App\Models\Document;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Tables\Table;
|
|
use Illuminate\Contracts\Support\Htmlable;
|
|
|
|
class DocumentResource extends Resource
|
|
{
|
|
protected static ?string $model = Document::class;
|
|
|
|
protected static ?string $navigationLabel = 'Resminamalar';
|
|
|
|
protected static ?string $pluralLabel = 'Resminamalar';
|
|
|
|
protected static ?int $navigationSort = 4;
|
|
|
|
public static function getNavigationIcon(): string | BackedEnum | Htmlable | null
|
|
{
|
|
return 'heroicon-o-document-text';
|
|
}
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return DocumentForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return DocumentsTable::configure($table);
|
|
}
|
|
|
|
public static function getRelations(): array
|
|
{
|
|
return [
|
|
//
|
|
];
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListDocuments::route('/'),
|
|
'create' => CreateDocument::route('/create'),
|
|
'edit' => EditDocument::route('/{record}/edit'),
|
|
];
|
|
}
|
|
}
|