© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•9mo ago•
3 replies
403gtfo

CreateAction::make()->before() not being triggered.

Ok I am having a seriously stupid moment... for some reason this simple little before() call is not being fired at all O_O any ideas?
The record gets created just fine... but no dd(). Which means I cant fire off other functions to do stuff.

I am seriously having a brain fart. doco: https://filamentphp.com/docs/3.x/actions/prebuilt-actions/create#lifecycle-hooks

<?php

namespace App\Filament\Resources\AchievementCategoryResource\Pages;

use App\Filament\Resources\AchievementCategoryResource;
use Filament\Actions\CreateAction;
use Filament\Resources\Pages\ListRecords;
use Archilex\AdvancedTables\AdvancedTables;

class ListAchievementCategories extends ListRecords
{
    use AdvancedTables;
    protected static string $resource = AchievementCategoryResource::class;

    protected function getHeaderActions(): array
    {
        return [
            CreateAction::make()
                ->label('xxxxxxxxxxxxx')
                ->before(fn() => dd('Before creating a new record')),
        ];
    }
}
<?php

namespace App\Filament\Resources\AchievementCategoryResource\Pages;

use App\Filament\Resources\AchievementCategoryResource;
use Filament\Actions\CreateAction;
use Filament\Resources\Pages\ListRecords;
use Archilex\AdvancedTables\AdvancedTables;

class ListAchievementCategories extends ListRecords
{
    use AdvancedTables;
    protected static string $resource = AchievementCategoryResource::class;

    protected function getHeaderActions(): array
    {
        return [
            CreateAction::make()
                ->label('xxxxxxxxxxxxx')
                ->before(fn() => dd('Before creating a new record')),
        ];
    }
}
Create action - Actions - Filament
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()
FilamentFFilament / ❓┊help
3y ago
Resource table action not being triggered
FilamentFFilament / ❓┊help
16mo ago
Actions\CreateAction::make() ->label('Generate from ChatGPT')
FilamentFFilament / ❓┊help
3y ago
CreateAction and EditAction not triggering
FilamentFFilament / ❓┊help
2y ago