mirror of
https://github.com/nihonbuzz/nihonbuzz-academy.git
synced 2026-01-26 05:25:37 +07:00
51 lines
1.4 KiB
PHP
51 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Admin\Resources\Vocabularies;
|
|
|
|
use App\Filament\Admin\Resources\Vocabularies\Pages\CreateVocabulary;
|
|
use App\Filament\Admin\Resources\Vocabularies\Pages\EditVocabulary;
|
|
use App\Filament\Admin\Resources\Vocabularies\Pages\ListVocabularies;
|
|
use App\Filament\Admin\Resources\Vocabularies\Schemas\VocabularyForm;
|
|
use App\Filament\Admin\Resources\Vocabularies\Tables\VocabulariesTable;
|
|
use App\Models\Vocabulary;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Support\Icons\Heroicon;
|
|
use Filament\Tables\Table;
|
|
|
|
class VocabularyResource extends Resource
|
|
{
|
|
protected static ?string $model = Vocabulary::class;
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedRectangleStack;
|
|
|
|
protected static ?string $recordTitleAttribute = 'word';
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return VocabularyForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return VocabulariesTable::configure($table);
|
|
}
|
|
|
|
public static function getRelations(): array
|
|
{
|
|
return [
|
|
//
|
|
];
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListVocabularies::route('/'),
|
|
'create' => CreateVocabulary::route('/create'),
|
|
'edit' => EditVocabulary::route('/{record}/edit'),
|
|
];
|
|
}
|
|
}
|