Have you seen our video tutorials? Check 'em out!

How to set up custom error pages

rickkuk - 3 weeks ago

Need instruction, specifically for 404...

Answer

hugogilmar - 3 weeks ago

I deal with that this way,

  1. Create a custom theme.
  2. Create custom error twig templates.
  3. Registrer error pages in theme service provider.
    protected $overrides = [
        'streams::errors/404' => 'theme::errors/404',
        'streams::errors/500' => 'theme::errors/500'
    ];

Hope this helps.

hugogilmar - 3 weeks ago

Hi,

Are you working with a custom theme(generated with make:addon)?

hugogilmar - 3 weeks ago

I deal with that this way,

  1. Create a custom theme.
  2. Create custom error twig templates.
  3. Registrer error pages in theme service provider.
    protected $overrides = [
        'streams::errors/404' => 'theme::errors/404',
        'streams::errors/500' => 'theme::errors/500'
    ];

Hope this helps.

ryanthompson - 3 weeks ago

View's delegate the error output when not in debug mode so you can simply override those: https://github.com/pyrocms/starter-theme/blob/master/src/StarterThemeServiceProvider.php#L20

rickkuk - 3 weeks ago

Thanks guys, that worked!

ryanthompson - 3 weeks ago

@rickkuk don't forget to mark answered as to signal others looking ^_^