© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
7 replies
Matthew

Halting the creation process

Not sure if Ive asked this before, but how is it possible to have a record before we create a record?
use Filament\Notifications\Actions\Action;
use Filament\Notifications\Notification;
 
protected function beforeCreate(): void
{
    if (! $this->getRecord()->team->subscribed()) {
        Notification::make()
            ->warning()
            ->title('You don\'t have an active subscription!')
            ->body('Choose a plan to continue.')
            ->persistent()
            ->actions([
                Action::make('subscribe')
                    ->button()
                    ->url(route('subscribe'), shouldOpenInNewTab: true),
            ])
            ->send();
    
        $this->halt();
    }
}
use Filament\Notifications\Actions\Action;
use Filament\Notifications\Notification;
 
protected function beforeCreate(): void
{
    if (! $this->getRecord()->team->subscribed()) {
        Notification::make()
            ->warning()
            ->title('You don\'t have an active subscription!')
            ->body('Choose a plan to continue.')
            ->persistent()
            ->actions([
                Action::make('subscribe')
                    ->button()
                    ->url(route('subscribe'), shouldOpenInNewTab: true),
            ])
            ->send();
    
        $this->halt();
    }
}

https://filamentphp.com/docs/3.x/panels/resources/creating-records#halting-the-creation-process
Creating records - Panel Builder - Filament
Solution
before create you should use
$this->data
$this->data
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Halting process in repeater
FilamentFFilament / ❓┊help
13mo ago
Customizing the creation process
FilamentFFilament / ❓┊help
3y ago
Need help with halting process
FilamentFFilament / ❓┊help
3y ago
Customizing the creation process of relationship
FilamentFFilament / ❓┊help
3y ago