So I need a way to redirect and clear a specific cookie if this error occurs but as it doesn't have an actual URL i'm finding it difficult.
Asked
Active
Viewed 163 times
1 Answers
1
In app/Exceptions/Handler.php
file, in report
method you can compare the instance of error with your required error type and return a view accordingly.
if($e instanceof \Illuminate\Session\TokenMismatchException){
return view('errors.404');
}

Milan Maharjan
- 4,156
- 1
- 21
- 28