facade/ignition
A sleek error page and debugging companion for Laravel apps. Facade Ignition shows detailed stack traces, request/context data, and friendly exception screens to quickly pinpoint issues during local development, with tools to inspect variables and code around failures.
Installation:
composer require facade/ignition --dev
Ignition is automatically detected by Laravel and requires no manual configuration for basic usage.
First Use Case:
Trigger an exception in your Laravel application (e.g., 1/0 in a route or controller). Ignition will replace Laravel’s default error page with an interactive, detailed exception page.
Where to Look First:
Debugging Workflow:
POST payload, headers, cookies).// In a route or controller:
$user = User::findOrFail($id); // Triggers Ignition if $id is invalid.
Ignition will show:
$id value.Environment-Specific Debugging:
.env values).Sharing Errors:
config/ignition.php:
'share' => [
'enabled' => true,
'host' => env('IGNITION_SHARE_HOST'),
],
Customizing Exception Handling:
php artisan vendor:publish --provider="Facade\Ignition\IgnitionServiceProvider"
config/ignition.php to:
Integration with Testing:
--verbose flag for CLI errors:
php artisan test --verbose
IDE Integration:
ignition.php to include IDE-specific metadata:
'ide' => [
'enabled' => true,
],
Production vs. Development:
APP_ENV=local in your .env to see Ignition pages.APP_DEBUG=true in .env will show Laravel’s default error page instead.
APP_ENV=local
APP_DEBUG=true
Sensitive Data Exposure:
.env files by default..env file in a shared error report, ensure IGNITION_REDACTED_ENV_VARS in ignition.php includes all secrets:
'redacted_env_vars' => [
'APP_KEY',
'DB_PASSWORD',
'MAIL_PASSWORD',
],
Caching Issues:
fastcgi_cache_bypass $http_x_ignition;
proxy_cache_bypass $http_x_ignition;
Custom Exception Handling:
App\Exceptions\Handler), ensure it does not swallow exceptions that Ignition should handle.response()->json() or response()->view() in render() without letting Ignition process the exception first.Asset Loading:
php artisan vendor:publish --tag=ignition-assets
Laravel Version Compatibility:
Keyboard Shortcuts:
Ctrl+F (or Cmd+F on Mac) to search the exception page for specific variables or errors.Custom Solution Suggestions:
config/ignition.php under solution_suggestions:
'solution_suggestions' => [
'App\\Exceptions\\InvalidUserException' => [
'message' => 'User not found. Check if the user exists in the database.',
'documentation' => 'https://your-app-docs.com/user-validation',
],
],
Debugging API Errors:
ignition.php's show_response option to display the full response body:
'show_response' => true,
Performance Debugging:
N+1 queries or slow SQL.AppServiceProvider:
if (env('APP_DEBUG')) {
DB::enableQueryLog();
}
Local Development Setup:
composer.json to ensure Ignition is only installed in local environments:
"require-dev": {
"facade/ignition": "^2.0"
}
composer install --dev to include Ignition in local setups.Extending Context Panels:
Context classes. Example:
// app/Providers/IgnitionServiceProvider.php
use Facade\Ignition\Context\Context;
public function boot()
{
Context::macro('customPanel', function () {
return [
'title' => 'Custom Data',
'content' => '<pre>' . print_r($this->exception->customData, true) . '</pre>',
];
});
}
Disabling Ignition Temporarily:
APP_DEBUG=false in .env to disable Ignition (e.g., for staging environments).if (!app()->environment('local') && !env('IGNITION_ENABLED')) {
$this->dontFlash();
}
How can I help you explore Laravel packages today?