Add laravel default exception blade files to view:cache#53353
Merged
taylorotwell merged 4 commits intoOct 31, 2024
Conversation
crynobone
reviewed
Oct 30, 2024
| */ | ||
| protected function registerExceptionRenderer() | ||
| { | ||
| $this->loadViewsFrom(__DIR__.'/../Exceptions/views', 'laravel-exceptions'); |
Member
There was a problem hiding this comment.
Do we need this when app.debug=false?
Contributor
Author
There was a problem hiding this comment.
This error page is only available with app.debug=true:

The views for that are cached with the namespace 'laravel-exceptions-renderer', (a few lines below the added code)
However if app.debug=false the following page is rended:

These views, also used for abort(404), etc. are stored in the path I added with this PR to the view:cache command, as they are always shown, independent of the app.debug value
These views can be overridden, see https://laravel.com/docs/11.x/errors#custom-http-error-pages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #53336
This PR adds the path of the default exception blade views to the view:cache command