there are two ways of doing this..
if (Auth::attempt(['email' => $email, 'password' => $password])) {
// Authentication passed...
return redirect()->intended('dashboard');
}
send another array called 'activation_key' => null or "" or whatever.. and Laravel will check that field too.
The way you are suggesting could be done.. you have $request in your middleware, so you get the username user entered, and do a query to see if activation_key is null etc and if so redirect back.. not sure why this is confusing?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community