Initial commit

This commit is contained in:
2025-10-11 17:02:49 +02:00
commit 92056f073f
243 changed files with 27536 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
<?php
namespace App\Filament\Resources\Photos;
use App\Filament\Resources\Photos\Pages\CreatePhoto;
use App\Filament\Resources\Photos\Pages\EditPhoto;
use App\Filament\Resources\Photos\Pages\ListPhotos;
use App\Filament\Resources\Photos\Pages\ViewPhoto;
use App\Filament\Resources\Photos\Schemas\PhotoForm;
use App\Filament\Resources\Photos\Schemas\PhotoInfolist;
use App\Filament\Resources\Photos\Tables\PhotosTable;
use App\Models\Photo;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
class PhotoResource extends Resource
{
protected static ?string $model = Photo::class;
protected static string | \BackedEnum | null $navigationIcon = 'heroicon-o-photo';
protected static string | \UnitEnum | null $navigationGroup = 'Treść';
protected static ?string $pluralModelLabel = 'Galeria';
protected static ?string $modelLabel = 'Zdjęcie';
protected static ?int $navigationSort = 4;
protected static ?string $recordTitleAttribute = 'Zdjęcie';
public static function form(Schema $schema): Schema
{
return PhotoForm::configure($schema);
}
public static function infolist(Schema $schema): Schema
{
return PhotoInfolist::configure($schema);
}
public static function table(Table $table): Table
{
return PhotosTable::configure($table);
}
public static function getRelations(): array
{
return [
//
];
}
public static function getPages(): array
{
return [
'index' => ListPhotos::route('/'),
'create' => CreatePhoto::route('/create'),
'view' => ViewPhoto::route('/{record}'),
'edit' => EditPhoto::route('/{record}/edit'),
];
}
}