mardi 20 octobre 2015

Laravel 5.1 login success message:

How to use in file

C:\...\vendor\laravel\framework\src\Illuminate\Foundation\Auth\AuthenticatesUsers.php

the next code correctly in postLogin()-function? How to define

$isLoginSuccess = ....?????????

That I can use the $isLoginSuccess like:

...
 return redirect($this->loginPath())->with('msg',$isLoginSuccess ? "You have logged successfully" : "")
            ->withInput($request->only($this->loginUsername(), 'remember'))
            ->withErrors([
                $this->loginUsername() => $this->getFailedLoginMessage(),
            ]);

And a master.blade.php'is I try to use:

@if(Session::has('msg'))
<p>Session::get('msg')</p>
@endif



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire