Notification after successful edit via table action

I have a table with an edit action, triggering a modal that contains the edit form for the model. I have to process some of the data before submitting the Eloquent update request. My plan was to check that the request was successful, then trigger a notification as the modal is closed.

My code looks like this applicable part of my code looks like this:

* DATA PROCESSING OCCURS HERE *

$updateAvailability = $availability->update($data);

if ($updateAvailability) {
    $message = $this->availHeading . ' updated';

    Notification::make() 
        ->title($message)
        ->success()
        ->send();
}


I'm successfully triggering my data processing, but the modal closes immediately after the $updateAvailability = $availability->update($data); call, and doesn't trigger a standard "save" notification. I've got this all handled within the action() method of the EditAction instance.

Is there a way to force in a notification on successful edit/update of the data model?
Was this page helpful?