added initial entries model
This commit is contained in:
parent
11f1dc6895
commit
a0a1c08ece
19 changed files with 487 additions and 6 deletions
58
app/Filament/Resources/Entries/EntryResource.php
Normal file
58
app/Filament/Resources/Entries/EntryResource.php
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Entries;
|
||||
|
||||
use App\Filament\Resources\Entries\Pages\CreateEntry;
|
||||
use App\Filament\Resources\Entries\Pages\EditEntry;
|
||||
use App\Filament\Resources\Entries\Pages\ListEntries;
|
||||
use App\Filament\Resources\Entries\Pages\ViewEntry;
|
||||
use App\Filament\Resources\Entries\Schemas\EntryForm;
|
||||
use App\Filament\Resources\Entries\Schemas\EntryInfolist;
|
||||
use App\Filament\Resources\Entries\Tables\EntriesTable;
|
||||
use App\Models\Entry;
|
||||
use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class EntryResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Entry::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedRectangleStack;
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'title';
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return EntryForm::configure($schema);
|
||||
}
|
||||
|
||||
public static function infolist(Schema $schema): Schema
|
||||
{
|
||||
return EntryInfolist::configure($schema);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return EntriesTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListEntries::route('/'),
|
||||
'create' => CreateEntry::route('/create'),
|
||||
'view' => ViewEntry::route('/{record}'),
|
||||
'edit' => EditEntry::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue