I followed this tutorial on creating a registration and login page using Laravel.
Everything works smoothly, the only issue is that I am unable to Login. If I provid
I added the following code to app\Exceptions\Handler.php to help clarify the error for the end-user, in addition to setting session to expire on close, as mentioned in this thread.
protected function prepareException(Exception $exception)
{
if ($exception instanceof TokenMismatchException) {
return new HttpException(
419,
"{$exception->getMessage()}. Please clear your browser cookies and try again.",
$exception
);
}
return parent::prepareException($exception);
}