R
Hi @karkiswapnil
A flash message is used to communicate back to the user of the website or application that an event has taken place.This may be something the user intended to do, or it might be something that is just informational. The key to remember about flash messages is that they are not persistent.They can be success message, error message, info message, warning message etc.
Just think that we have completed an action & did not show any information about that to user then what a user will think.Whether its done or not. He will not clear with action.
So, after every event we show flash message to user accordingly -
Success -
session()->flash('success', trans('admin::app.response.update-success', ['name' => 'Attribute']));
Error -
session()->flash('error', trans('admin::app.response.delete-failed', ['name' => 'Attribute']));
Warning -
session()->flash('warning', trans('admin::app.response.customer-associate', ['name' => 'Customer Group']));
Info -
session()->flash('info', trans('admin::app.datagrid.mass-ops.partial-action', ['resource' => 'attributes']));
Thanks