64 lines
1.8 KiB
PHP
64 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Channels;
|
|
|
|
use App\Filament\Concerns\FollowsAdminMode;
|
|
use App\Filament\Resources\Channels\Pages\CreateChannel;
|
|
use App\Filament\Resources\Channels\Pages\EditChannel;
|
|
use App\Filament\Resources\Channels\Pages\ListChannels;
|
|
use App\Filament\Resources\Channels\Schemas\ChannelForm;
|
|
use App\Filament\Resources\Channels\Tables\ChannelsTable;
|
|
use App\Models\Channel;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Support\Icons\Heroicon;
|
|
use Filament\Tables\Table;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use UnitEnum;
|
|
|
|
class ChannelResource extends Resource
|
|
{
|
|
use FollowsAdminMode;
|
|
|
|
protected static ?string $model = Channel::class;
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedArrowsRightLeft;
|
|
|
|
protected static string|UnitEnum|null $navigationGroup = 'Vermietung';
|
|
|
|
protected static ?string $navigationLabel = 'Portale & Kalender';
|
|
|
|
protected static ?string $modelLabel = 'Portalkanal';
|
|
|
|
protected static ?string $pluralModelLabel = 'Portale & Kalender';
|
|
|
|
protected static ?int $navigationSort = 4;
|
|
|
|
protected static ?string $recordTitleAttribute = 'name';
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return ChannelForm::configure($schema, selectProperty: true);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return ChannelsTable::configure($table);
|
|
}
|
|
|
|
public static function canDelete(Model $record): bool
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListChannels::route('/'),
|
|
'create' => CreateChannel::route('/create'),
|
|
'edit' => EditChannel::route('/{record}/edit'),
|
|
];
|
|
}
|
|
}
|