Embed Notification Action

I'm at a loss on this one. I have a notification that pops up and halts a Create form when no credit exists. I then have a button to request a credit limit. I cannot seem to fire off said custom action. for the moment I have a die() in place.



protected function beforeCreate(): void
    {
        $credit = new CreditLimitReport($this->data['client_id']);
        if(!$credit->isLive)
        {
            Notification::make()
                ->warning()
                ->title('Credit not set')
                ->actions([
                    Action::make('request_credit')
                        ->label('Request Credit')
                        ->action(function(){
                            die('test');
                        }) ,
                ])
                ->send();
            $this->halt();
        }
    }
Was this page helpful?