In the spirit of keeping a developer's hands as much as possible out of the core installation of laravel, I am trying to find a way to use custom error pages without messing with the core resources folder's blade files, but use the ones provided from the package relevant folder.
So is there a way to include error page templates in the ServiceProvider like with the $this->loadViewsFrom?
Add a comment
|
1 Answer
in the resources/views folder you'll find a folder called errors. In here you can create custom error pages.
For example: 404.blade.php
<html>
<head><title>Page not found :o</title></head>
<body>
<h1>Sorry, we can't find what you're looking for.</h1>
<a href="https://example.com">Take me back to the main site.</a>
</body>
</html>
This page will now show automagically when your application throws a 404. (you can do this with all http response codes)
1 Comment
Kostas
hello Jesse, thanks for your reply mate but this is not what I'm looking for. I probably haven't phrased my question very well but what you are suggesting is what I don't want to use. You see I work with a single installation of laravel and have each of my projects organized in a package folder and I want everything to be in there. Thanks again for your reply.