© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
Rahaf

CreateAction::make()

I try to make Filament Nested Resources
this is my code i use it in v2
the problem is the create action does not work
i use create action ->url and in v3 ->successRedirectUrl

Are they different or the same?

public static function getPages(): array
    {
        return [
            'index' => Pages\ListLevelGames::route('/'),
            'level-games' => Pages\ListLevelGames::route('/{record}'),
            'create' => Pages\CreateLevelGame::route('/{record}/create'),
            'edit' => Pages\EditLevelGame::route('/{record}/edit'),
        ];
    }
public static function getPages(): array
    {
        return [
            'index' => Pages\ListLevelGames::route('/'),
            'level-games' => Pages\ListLevelGames::route('/{record}'),
            'create' => Pages\CreateLevelGame::route('/{record}/create'),
            'edit' => Pages\EditLevelGame::route('/{record}/edit'),
        ];
    }

protected function getHeaderActions(): array
    {
        return [
            Actions\CreateAction::make()                
                      ->url(fn (): string => LevelGameResource::getUrl('create', ['record' => request('record')])), 

            
        ];
    }
protected function getHeaderActions(): array
    {
        return [
            Actions\CreateAction::make()                
                      ->url(fn (): string => LevelGameResource::getUrl('create', ['record' => request('record')])), 

            
        ];
    }

here CreateAction on v3 documents

CreateAction::make()
    ->successRedirectUrl(fn (Model $record): string => route('posts.edit', [
        'post' => $record,
    ])
here CreateAction on v3 documents

CreateAction::make()
    ->successRedirectUrl(fn (Model $record): string => route('posts.edit', [
        'post' => $record,
    ])
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

CreateAction::make()->before() not being triggered.
FilamentFFilament / ❓┊help
9mo ago
Actions\CreateAction::make() ->label('Generate from ChatGPT')
FilamentFFilament / ❓┊help
3y ago
CreateAction inside infoList?
FilamentFFilament / ❓┊help
13mo ago
test relationmanager CreateAction
FilamentFFilament / ❓┊help
15mo ago