Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Custom 404 Page #99

Closed
venom1979 opened this issue Feb 28, 2020 · 4 comments
Closed

Custom 404 Page #99

venom1979 opened this issue Feb 28, 2020 · 4 comments

Comments

@venom1979
Copy link

How can I set a custom 404 page using the current theme? Is this possible?

@kaidesu
Copy link
Contributor

kaidesu commented Mar 2, 2020

totally 👍 nothing special should be needed here - Laravel looks for custom error pages within an errors folder, so you'll want to create errors/404.blade.php to create a custom 404 page.

https://laravel.com/docs/6.x/errors#custom-http-error-pages

@kaidesu kaidesu closed this as completed Mar 2, 2020
@venom1979
Copy link
Author

Well considering that all of the theme files are hosted in their own folders (themes/ThemeName), and the errors folder must be included in the resources/views folder, that's not really the case. Meaning, if I switch themes, it will still default to the resources/views/errors/404.blade.php file, which does not change when I switch the current theme. I tried creating an errors folder within the theme folder and it still defaults to the resources/views/errors folder rather than the current theme.

I was able to get around this by using @include('errors.404) in the resources/errors/404.blade.php file, but this is more like a hack than anything else.

@kaidesu
Copy link
Contributor

kaidesu commented Mar 6, 2020

Hmm, I see what you mean. It does look like Laravel handles resolving these views a little differently than everything else. I'll have to look in to how to override/extend that here.

Re-opening 👍

@kaidesu kaidesu reopened this Mar 6, 2020
@kaidesu
Copy link
Contributor

kaidesu commented Apr 2, 2020

Taken care of in v7.1.0 👍

@kaidesu kaidesu closed this as completed Apr 2, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants