Captures the current working tree after theme slots, ArticleAccess, and the payment / paid-content plugins so subsequent work has a reviewable git history.
58 lines
1.4 KiB
PHP
58 lines
1.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Filament\Resources\Plugins;
|
|
|
|
use App\Filament\Resources\Plugins\Pages\CreatePlugin;
|
|
use App\Filament\Resources\Plugins\Pages\EditPlugin;
|
|
use App\Filament\Resources\Plugins\Pages\ListPlugins;
|
|
use App\Filament\Resources\Plugins\Schemas\PluginForm;
|
|
use App\Filament\Resources\Plugins\Tables\PluginsTable;
|
|
use App\Models\Plugin;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Support\Icons\Heroicon;
|
|
use Filament\Tables\Table;
|
|
|
|
class PluginResource extends Resource
|
|
{
|
|
protected static ?string $model = Plugin::class;
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedPuzzlePiece;
|
|
|
|
protected static bool $shouldRegisterNavigation = false;
|
|
|
|
public static function canCreate(): bool
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return PluginForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return PluginsTable::configure($table);
|
|
}
|
|
|
|
public static function getRelations(): array
|
|
{
|
|
return [
|
|
//
|
|
];
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListPlugins::route('/'),
|
|
'create' => CreatePlugin::route('/create'),
|
|
'edit' => EditPlugin::route('/{record}/edit'),
|
|
];
|
|
}
|
|
}
|