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();
    }
}

https://filamentphp.com/docs/3.x/panels/resources/creating-records#halting-the-creation-process
Solution
before create you should use $this->data
Was this page helpful?