Flash Notifications

How to trigger flash notifications and messages.

Via JavaScript

Within your Control Panel Vue components, you may trigger any number of flash notifications at any point.


Trigger a success notification.

this.$notify.success('Thing updated!');


Trigger an error notification.

this.$notify.error('Oh no! That thing failed.');


Both the success and error methods accept an object as the second argument containing options.


This will remove the close button.

this.$notify.error('Oops, please check the values.', { dismissible: false });


This will automatically close the notification after the specified milliseconds.

this.$notify.success('Updated the thing.', { timeout: 2000 });

Via PHP with Laravel

By returning a controller response with $success or $errors variables, you can display success error and messages, respectively.


Trigger a success notification.

return view()
        ->withSuccess('The thing did the thing it was supposed to, hurray!');


Show persistant error messages.

 return redirect()
         ->withErrors(['Oh no it did not do the thing!']);
Last modified on September 4, 2018