Skip to content

About

Beautiful, branded production error and exception pages for Laravel that complement Ignition.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

laranail/error-pages

Tests Static analysis License MIT

laranail/error-pages is not published to Packagist, so there is no registry-version badge to show: see Install.

Beautiful, branded production error and exception pages for Laravel that complement Ignition — it renders the end-user page, Ignition keeps the dev debug page, your reporting tools keep the report pipeline.

Adapts to the caller's context and front-end stack — Blade (web), RFC 7807 JSON (API), Inertia/Vue/React (SPA), and Filament/Nova panels — progressively enhanced and fully configurable. Runs on Laravel ^13.0, PHP ^8.4.1 || ^8.5. The framework-agnostic rendering engine lives in an illuminate-free Core\ namespace within the package.

Install

composer require laranail/error-pages

It self-registers and takes over production-style error responses out of the box (dev 500s still show Ignition). Publish the config to customise:

php artisan vendor:publish --tag=laranail::error-pages-config

Quick start guide and usage

Getting started

Nothing to configure: the service provider registers itself, and with APP_DEBUG=false a missing route already renders a branded 404 and an Accept: application/json request gets RFC 7807 JSON. To brand it or pick a front-end stack, set these in .env:

ERROR_PAGES_BRAND="Acme Inc"
ERROR_PAGES_LOGO="/images/logo.svg"
ERROR_PAGES_THEME=midnight
ERROR_PAGES_STACK=inertia-react

Usage

# Render the branded 503 page to a file, even while APP_DEBUG=true keeps Ignition on
php artisan laranail::error-pages.preview 503 --output=storage/app/error-503.html

# With APP_DEBUG=false, an API caller hitting a missing route gets RFC 7807 JSON
curl -i -H "Accept: application/json" https://acme.test/orders/does-not-exist

Reshape it from a service provider:

use Simtabi\Laranail\ErrorPages\Facades\ErrorPages;

ErrorPages::theme('crimson')
    ->skipWhen(fn ($e, $request) => $request?->is('webhooks/*'))
    ->pipe(fn ($page) => $page->withRequestId(request()->header('X-Request-Id')));

The full walkthrough is in Getting started; everything else is in the documentation index.

Documentation

Hosted at https://opensource.simtabi.com/documentation/laranail/error-pages/.

Guides

Reference

Recipes

Project

License

MIT © Simtabi LLC. See LICENSE.

About

Beautiful, branded production error and exception pages for Laravel that complement Ignition.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages