Download the PHP package vkm-apps/x-error without Composer
On this page you can find all versions of the php package vkm-apps/x-error. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vkm-apps/x-error
More information about vkm-apps/x-error
Files in vkm-apps/x-error
Package x-error
Short Description A Laravel package providing multilingual error pages.
License MIT
Homepage https://github.com/vkm-apps/x-error
Informations about the package x-error
X-Error
A clean, customizable, and developer-friendly error page system for Laravel.
X-Error replaces Laravelβs default error pages with a polished UI, optional exception details, and full localization support β while remaining simple and unobtrusive. The default layout is using Tailwind classes.
π¦ Installation
Install the package via Composer:
Laravel will automatically discover and register the service provider.
βοΈ Publishing Assets
You may publish the package resources as needed.
Publish Configuration
Publish Views (optional)
Publish Translations (optional)
π§ How It Works
The package registers a custom exception handler that renders error pages using the x-error views.
During rendering, the following data is passed to the error view:
These variables are always available β including when using your own custom layout.
π§© Blade Component
The package registers the following Blade component:
This component is automatically available in all views.
π¨ Configuration
The configuration file is located at:
Layout
You may define a custom layout view.
If set, you must manually include the
Example:
Exception Details
Control visibility of exception stack traces.
enabled β Enable or disable exception output
title β Title shown above exception details
permission β Permission required to view exceptions (null = all authenticated users)
Colors
By default, all error pages use a neutral color:
You may optionally define colors per HTTP status code, but this is not required.
Redirect Button
A redirect button is shown on all error pages except 503.
Set url to null to hide the button
π Localization
Error titles and messages are fully translatable.
The package resolves translations using:
Example Translation File
Translations can be published and overridden as needed.
π§ͺ Custom Layout Example
If you use your own layout, include the component manually or just use your own layout and error styling:
<x-error :code="$code" :title="$title" :message="$message" :color="$color" :exception="$exception" />
All values are automatically injected by the exception handler into your view.
π‘ Best Practices
-
Enable exception details only in local or staging
-
Keep production error pages minimal
-
Use translations for all user-facing text
- Avoid over-styling error states
π License
This package is open-sourced software licensed under the MIT license.
β€οΈ Contributing
Contributions are welcome! Fork the repository Create a feature branch
Submit a pull request
β Credits
Created with β€οΈ for the Laravel community.