redirect to 404 page automatically at laravel 5.4
In addition, you may provide the response text:
return abort(403, 'Unauthorized action.');
just add abort
method
return abort(404);
it's automatically redirect to your resources/views/errors/404.blade.php
return abort(404);
and set your routes too for this particular action/method with get request.