Exception page (404, 500) AsgardCMS way

  • Hi,

    I'm comfortable with the Laravel way of displaying exception (404, 500) pages. (Putting a 404.blade file in 'resources/views/errors/')
    Only I need to find a way to display the 404 page in the Themes folder. Because of styling and fetching data from database.

    I see two solutions, but I don't know how to implement them.

    1. In 'app/Exceptions/Handler.php' add logic to redirect to a 404 page which is created in AsgardCMS so it is handled as normal page, downside is that the response will be a redirect to a page (status ok 200). This could be 'fixed' by modifying the headers.

    2. Add a 404.blade page in resources/views/errors and include the 404 page from 'Themes/[theme-name]/views/errors/404.blade.php'. Downside is that no additional data could be send. This can be solved with static content (which is not preferable).

    Is there a way to handle one / both options?

    Best regards,

Log in to reply

Looks like your connection to AsgardCms was lost, please wait while we try to reconnect.