middleware('guest'); } public function showResetForm(Request $request, $token = null) { // Check that the user is active if ($user = User::where('email', '=',$request->input('email'))->where('activated','=','1')->count() > 0) { return view('auth.passwords.reset')->with( ['token' => $token, 'email' => $request->email] ); } return redirect()->route('password.request')->withErrors(['email' => 'No matching users']); } }