Flashing Data
You may flash data using theInertia::flash() method.
back() directly onto the flash() call.
flash() onto render(), or vice versa.
Accessing Flash Data
Flash data is available onpage.flash. You may also listen for the global flash event or use the onFlash callback.
The onFlash Callback
You may use theonFlash callback to handle flash data when making visits.
Global Flash Event
You may use the globalflash event to handle flash data in a central location, such as a layout component. For more information on events, see the events documentation.
flash event is not cancelable.
Client-Side Flash
You may set flash data on the client without a server request using therouter.flash() method.