In this tutorial I’m going to share how to show success message in laravel after button performing action.
First go to your blade page and paste this code where you want to show the success message.
@if(session('cart_delete'))
<div class="alert alert-success" role="alert">
{{session('cart_delete')}}
</div>
@endif
@if(session('success'))
<div class="alert alert-success alert-dismissible fade show" role="alert">
<strong>{{session('success')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
Next go to your controller and paste this code.
Now its working properly. Thanks for reading.