Captures the current working tree after theme slots, ArticleAccess, and the payment / paid-content plugins so subsequent work has a reviewable git history.
72 lines
1.6 KiB
PHP
72 lines
1.6 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Filament\Resources\Links;
|
|
|
|
use App\Filament\Resources\Links\Pages\CreateLink;
|
|
use App\Filament\Resources\Links\Pages\EditLink;
|
|
use App\Filament\Resources\Links\Pages\ListLinks;
|
|
use App\Filament\Resources\Links\Schemas\LinkForm;
|
|
use App\Filament\Resources\Links\Tables\LinksTable;
|
|
use App\Models\Link;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Support\Icons\Heroicon;
|
|
use Filament\Tables\Table;
|
|
use App\Filament\Concerns\HasTranslatedLabels;
|
|
|
|
class LinkResource extends Resource
|
|
{
|
|
use HasTranslatedLabels;
|
|
|
|
protected static ?string $model = Link::class;
|
|
|
|
|
|
|
|
|
|
protected static function navKey(): string
|
|
{
|
|
return 'links';
|
|
}
|
|
|
|
protected static function modelKey(): string
|
|
{
|
|
return 'link';
|
|
}
|
|
|
|
protected static function groupKey(): string
|
|
{
|
|
return 'content';
|
|
}
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedRectangleStack;
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return LinkForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return LinksTable::configure($table);
|
|
}
|
|
|
|
public static function getRelations(): array
|
|
{
|
|
return [
|
|
//
|
|
];
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListLinks::route('/'),
|
|
'create' => CreateLink::route('/create'),
|
|
'edit' => EditLink::route('/{record}/edit'),
|
|
];
|
|
}
|
|
}
|