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\Comments;
|
|
|
|
use App\Filament\Resources\Comments\Pages\CreateComment;
|
|
use App\Filament\Resources\Comments\Pages\EditComment;
|
|
use App\Filament\Resources\Comments\Pages\ListComments;
|
|
use App\Filament\Resources\Comments\Schemas\CommentForm;
|
|
use App\Filament\Resources\Comments\Tables\CommentsTable;
|
|
use App\Models\Comment;
|
|
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 CommentResource extends Resource
|
|
{
|
|
use HasTranslatedLabels;
|
|
|
|
protected static ?string $model = Comment::class;
|
|
|
|
|
|
|
|
|
|
protected static function navKey(): string
|
|
{
|
|
return 'comments';
|
|
}
|
|
|
|
protected static function modelKey(): string
|
|
{
|
|
return 'comment';
|
|
}
|
|
|
|
protected static function groupKey(): string
|
|
{
|
|
return 'content';
|
|
}
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedRectangleStack;
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return CommentForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return CommentsTable::configure($table);
|
|
}
|
|
|
|
public static function getRelations(): array
|
|
{
|
|
return [
|
|
//
|
|
];
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListComments::route('/'),
|
|
'create' => CreateComment::route('/create'),
|
|
'edit' => EditComment::route('/{record}/edit'),
|
|
];
|
|
}
|
|
}
|