0

I want shown message in laravel admin panel after action is executed or when i will redirect to listing or other page.

I have configured the laravel-admin package so inbuilt laravel module message showing in toaster so i want to need similar to this.

So can you please let me know if anyone know about this.

Thanks.

Kishan Patel
  • 485
  • 4
  • 17
  • Do you already have a working message toaster can you show how that is working? Maybe this will help you https://laravel.com/docs/5.7/session#flash-data ? – Mike Dec 31 '18 at 09:59
  • I'm aware with flash message in symfony but when we used flash then need to add code for showing flash message in view file. But in my case laravel-admin package is used toaster so how can i add or show my new message in toaster – Kishan Patel Dec 31 '18 at 12:49

1 Answers1

2

You can use this in case for redirecting:

admin_toastr(__('Outlet created successfully'));
return redirect(admin_url('/'));

Or in case of return after any action execution you use like below

public function sale(Request $request,Content $content) {
  return $content->withSuccess('Success', 'Fund has been transfered successfully');
}
Azametzin
  • 5,223
  • 12
  • 28
  • 46
Shohanur
  • 116
  • 7