I have a login on my website, but the auth() check in combination with the if statement is not working correctly.
After some weird errors, I checked the output of the check in the if:
public function store()
{
$check = (! (auth()->attempt(request(['id', 'password']))));
if($check);
{
dd($check);
return back()->withErrors([
'message' => 'Überprüfen Sie Ihre Angabe und versuchen Sie es noch einmal.'
]);
}
return redirect()->home();
}
The output for check is always FALSE, but it shouldn't even come to the output then?!
When I don't dd(), the user is logged in, but with an error.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2wmHmZc
via IFTTT
Aucun commentaire:
Enregistrer un commentaire