My 404.blade.php view is using my default layout, but if the page is 404 i want to hide some views I include in the default layout.
Is this possible?
Something like
@if ($page->notFound)
Or do I really have to create a custom layout to use in the 404 view.
As of Laravel 5.1, whenever an HttpException is thrown and handled by Laravel's exception handler the Exception will be passed the view as well (this will not be the case, however, for JSON responses).
So in your default layout you could have something like:
@if(isset($exception) && $exception->getStatusCode() == 404)
@endif
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