prajakta prajakta - 3 months ago 8x
PHP Question

Sucess message is not getting displayed in laravel

I want to show a success message once the email is sent after redirected to same page. Here is my code :

return redirect('currentshowreport?showid='.$show_id)->with('success','Email sent successfully');

I am getting redirected to the specified page but the success message is not getting displayed. How to achieve this?


Try this:

@if (session('success'))
    <div class="alert alert-success">
        {{ session('success') }}