wpstarter / framework

The WpStarter Framework - Laravel Framework for WordPress
https://wpstarter.dev
MIT License
15 stars 4 forks source link

Mechanism to override / customize error pages (ex: 40x or 50x) #65

Closed fabarea closed 1 year ago

fabarea commented 1 year ago

Is there a way to override an error page?

I naively attempted to override the error page by copying the blade template from vendor/wpstarter/framework/src/WpStarter/Foundation/Exceptions/views/401.blade.php to resources/views/401.blade.php, hoping that it would recognize the override. However, that was not the case.

Thank you in advance for your insight.

Perhaps it would be beneficial to add a few lines in the documentation regarding this topic if there is an existing mechanism, as I anticipate that this will be a recurrent question.

as247 commented 1 year ago

@fabarea have you checked laravel document for errors page location? https://laravel.com/docs/8.x/errors#custom-http-error-pages i think it should be resources/views/errors/401.blade.php instead

fabarea commented 1 year ago

@as247 thanks!