I'm working with laravel 5.2, and I have a problem with customized authentification. It doesn't log the user on .
Here you can find my code for the function :
public function login(Request $request)
{
$this->validateLogin($request);
$email = $request->get('email');
$user = User::where('email', $email)->first();
if(! is_null($user))
{
if (Auth::login($user))
{
return redirect('/profile');
}
}
else
{
$this->register($request);
}
}
In the place of Auth::login, I tried also the function attempt and check, but nothing was working ...
It logs the user, but it showed a blank page, without redirecting to the url..
Can you help me plz?
Thanks alot
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire