vendredi 28 octobre 2016

Redirect to login page with message not working in laravel 5.3

When registering for external link, I want to dislay a message :

 if (!Auth::check()){
        Session::flash('message', trans('msg.please_create_account_before_playing', ['tournament' => $tournament->name]));
        return redirect(URL::action('Auth\LoginController@login'));
    }

In my login page, I have:

@if (Session::has('message'))
   <div class="alert alert-info">
    <button type="button" class="close" data-dismiss="alert"><span>×</span><span class="sr-only">Close</span></button>
    </div>
@endif

I checked in my login page, with laravel debugbar, and there is no message var in session. But it never shows up...

Any idea why it is not working?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire