vendredi 23 mars 2018

Trying to user "with" after a redirect in Laravel

I'm trying to use the with method after a redirect to display an error message/ success message when nesecarry.

According to the Laravel docs you can do this

  if(!$user){
      return redirect('/')->with('status', 'Profile Not Found');
    }

View

  @if (session('status'))
      <div class="alert alert-info">
        
      </div>
    @endif

But this is not displayig anywhere. Do I need to define session status somewhere.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire