I want to send some data or even just a message to my front end when I redirect a user on email verification click.
The click works fine and the verified_at field gets updated and then using redirect('/login') I get back to the correct react component. What I would like to do is display a message here saying something like "Cool, email verified, you can now login"
public function verify(Request $request)
{
$userID = $request['id'];
$user = User::findOrFail($userID);
$date = date('Y-m-d g:i:s');
// update email verified_at field
$user->email_verified_at = $date;
$user->save();
return redirect('/login');
}
I have also tried doing something like
return redirect('/login')->with('blah blah blah');
Any ideas on how I can go about this would be great.