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.7 KiB
PHP
72 lines
1.7 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Filament\Resources\Attachments;
|
|
|
|
use App\Filament\Resources\Attachments\Pages\CreateAttachment;
|
|
use App\Filament\Resources\Attachments\Pages\EditAttachment;
|
|
use App\Filament\Resources\Attachments\Pages\ListAttachments;
|
|
use App\Filament\Resources\Attachments\Schemas\AttachmentForm;
|
|
use App\Filament\Resources\Attachments\Tables\AttachmentsTable;
|
|
use App\Models\Attachment;
|
|
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 AttachmentResource extends Resource
|
|
{
|
|
use HasTranslatedLabels;
|
|
|
|
protected static ?string $model = Attachment::class;
|
|
|
|
|
|
|
|
|
|
protected static function navKey(): string
|
|
{
|
|
return 'attachments';
|
|
}
|
|
|
|
protected static function modelKey(): string
|
|
{
|
|
return 'attachment';
|
|
}
|
|
|
|
protected static function groupKey(): string
|
|
{
|
|
return 'content';
|
|
}
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedRectangleStack;
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return AttachmentForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return AttachmentsTable::configure($table);
|
|
}
|
|
|
|
public static function getRelations(): array
|
|
{
|
|
return [
|
|
//
|
|
];
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListAttachments::route('/'),
|
|
'create' => CreateAttachment::route('/create'),
|
|
'edit' => EditAttachment::route('/{record}/edit'),
|
|
];
|
|
}
|
|
}
|