I would like to show 404 page in Laravel 5 while MethodNotAllowedHttpException
throws.
Can anyone help me in this regard?
Add this to app/Exceptions/Handler.php
:
public function render($request, Exception $e)
{
if ($e instanceof MethodNotAllowedHttpException)
{
abort(404);
}
return parent::render($request, $e);
}
Then edit resource/views/errors/404.blade.php
to personalize the page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With