Update dependencies and configuration for Laravel project; added Filament support, modified .gitignore, and adjusted welcome page links.
This commit is contained in:
51
app/Filament/Resources/Groups/GroupResource.php
Normal file
51
app/Filament/Resources/Groups/GroupResource.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Groups;
|
||||
|
||||
use App\Filament\Resources\Groups\Pages\CreateGroup;
|
||||
use App\Filament\Resources\Groups\Pages\EditGroup;
|
||||
use App\Filament\Resources\Groups\Pages\ListGroups;
|
||||
use App\Filament\Resources\Groups\RelationManagers\PilgrimsRelationManager;
|
||||
use App\Filament\Resources\Groups\Schemas\GroupForm;
|
||||
use App\Filament\Resources\Groups\Tables\GroupsTable;
|
||||
use App\Models\Group;
|
||||
use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class GroupResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Group::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedRectangleStack;
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'namenamenamname';
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return GroupForm::configure($schema);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return GroupsTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [
|
||||
PilgrimsRelationManager::class,
|
||||
];
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListGroups::route('/'),
|
||||
'create' => CreateGroup::route('/create'),
|
||||
'edit' => EditGroup::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user