@aurawindsurfing Sure that helped. But let me explain, I am already able to verify the user email and was thinking about how the whole thing would work on the front end. For some sites, when the verify email link is clicked the user is redirected to the login page.
Should I be redirecting to the web app login page too?
I tried this code
public function verify(Request $request)
{
$user_id = $request->id;
$user = User::findOrFail($user_id);
$date = date("Y-m-d g:i:s");
$user->email_verified_at = $date;
$user->save();
return redirect("http://www.domain.com/login");
}
and two things should happen when the user clicks the verify link
- User
email_verified_at is set to $date (successful)
- User is redirected to web app login page (failed)
Redirect fails with this message
The requested URL /login was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
But if i enter the same url http://www.domain.com/login in the web browser, I can see the page. What is wrong with the redirect?