Convert Figma logo to code with AI

facade logoignition

A beautiful error page for Laravel apps

2,079
185
2,079
5

Top Related Projects

13,165

PHP errors for cool kids

💥 Collision is a beautiful error reporting tool for command-line applications

Debugbar for Laravel (Integrates PHP Debug Bar)

Provides tools to manage errors and ease debugging PHP code

The official Laravel SDK for Sentry (sentry.io)

Quick Overview

Ignition is a powerful error page for Laravel applications. It provides a detailed, user-friendly interface for debugging errors in development, offering features like stack traces, request information, and query details. Ignition aims to make error handling and debugging in Laravel more efficient and developer-friendly.

Pros

  • Enhanced error reporting with a clean, interactive interface
  • Customizable and extendable through solutions and custom tabs
  • Integrates seamlessly with Laravel's error handling system
  • Provides useful debugging tools like query information and request details

Cons

  • May expose sensitive information if accidentally left enabled in production
  • Can be resource-intensive for applications with frequent errors
  • Requires additional configuration for optimal use in some environments
  • Limited usefulness in production environments where detailed error information is not desired

Code Examples

  1. Basic usage in Laravel:
// In app/Exceptions/Handler.php
use Facade\Ignition\Exceptions\ViewException;

public function register()
{
    $this->reportable(function (ViewException $e) {
        if (app()->environment('local')) {
            return true;
        }
    });
}
  1. Adding a custom solution:
use Facade\IgnitionContracts\HasSolutionsForThrowable;
use Facade\IgnitionContracts\Solution;
use Throwable;

class CustomSolution implements HasSolutionsForThrowable
{
    public function canSolve(Throwable $throwable): bool
    {
        return $throwable instanceof CustomException;
    }

    public function getSolutions(Throwable $throwable): array
    {
        return [
            Solution::create('Custom Solution')
                ->setSolutionDescription('This is a custom solution for your error.')
                ->setDocumentationLinks([
                    'Read more' => 'https://example.com/docs',
                ]),
        ];
    }
}
  1. Configuring Ignition:
// In config/ignition.php
return [
    'editor' => env('IGNITION_EDITOR', 'phpstorm'),
    'theme' => env('IGNITION_THEME', 'light'),
    'enable_share_button' => env('IGNITION_SHARING_ENABLED', true),
    'register_commands' => env('REGISTER_IGNITION_COMMANDS', false),
    'ignored_solution_providers' => [
        // Add any solution providers you want to ignore
    ],
    'enable_runnable_solutions' => env('IGNITION_ENABLE_RUNNABLE_SOLUTIONS', null),
    'remote_sites_path' => env('IGNITION_REMOTE_SITES_PATH', ''),
    'local_sites_path' => env('IGNITION_LOCAL_SITES_PATH', ''),
    'housekeeping_endpoint_prefix' => '_ignition',
];

Getting Started

  1. Install Ignition via Composer:

    composer require --dev facade/ignition
    
  2. Publish the configuration file:

    php artisan vendor:publish --provider="Facade\Ignition\IgnitionServiceProvider" --tag="ignition-config"
    
  3. Ensure your app/Exceptions/Handler.php is set up to use Ignition (usually done automatically in newer Laravel versions).

  4. Configure Ignition in config/ignition.php as needed for your environment.

  5. Run your Laravel application and trigger an error to see Ignition in action.

Competitor Comparisons

13,165

PHP errors for cool kids

Pros of Whoops

  • Lightweight and easy to integrate into any PHP project
  • Highly customizable error pages and handlers
  • Supports multiple output formats (HTML, JSON, XML, etc.)

Cons of Whoops

  • Less Laravel-specific features compared to Ignition
  • Fewer built-in debugging tools and integrations
  • May require more manual configuration for advanced use cases

Code Comparison

Whoops:

$whoops = new \Whoops\Run;
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
$whoops->register();

Ignition:

use Facade\Ignition\Ignition;

Ignition::make()
    ->registerConfigAliases()
    ->register();

Summary

Whoops is a versatile error handling library for PHP applications, while Ignition is tailored specifically for Laravel projects. Whoops offers greater flexibility and can be used in various PHP frameworks, but Ignition provides more Laravel-centric features and integrations out of the box. Whoops is simpler to set up and use in non-Laravel environments, whereas Ignition offers a more comprehensive debugging experience for Laravel developers with features like solution suggestions and query debugging. The choice between the two depends on the project's requirements and the developer's preference for customization versus Laravel-specific functionality.

💥 Collision is a beautiful error reporting tool for command-line applications

Pros of Collision

  • More lightweight and focused on CLI error reporting
  • Provides a highly customizable and interactive CLI debugging experience
  • Offers a "Solutions" feature to suggest fixes for common errors

Cons of Collision

  • Limited to CLI environments, unlike Ignition's web-based error reporting
  • Lacks some of Ignition's advanced features like query and request information
  • May require more manual configuration for optimal use

Code Comparison

Collision error handling:

use NunoMaduro\Collision\Provider;

$provider = new Provider();
$provider->register();

Ignition error handling:

use Facade\Ignition\Ignition;

Ignition::make()
    ->registerConfigAliases()
    ->register();

Both libraries aim to improve error reporting and debugging in Laravel applications, but they focus on different environments. Collision excels in CLI-based error handling, offering a more interactive and customizable experience for command-line debugging. Ignition, on the other hand, provides a comprehensive web-based error reporting solution with additional features like query and request information. The choice between the two depends on the specific needs of your project and the primary environment in which you'll be debugging.

Debugbar for Laravel (Integrates PHP Debug Bar)

Pros of Laravel Debugbar

  • Provides real-time performance metrics and database query information
  • Offers a comprehensive view of application state, including session data and route information
  • Highly customizable with the ability to add custom data collectors

Cons of Laravel Debugbar

  • Can impact application performance when enabled in production
  • Requires manual installation and configuration
  • May expose sensitive information if not properly secured

Code Comparison

Laravel Debugbar:

use Barryvdh\Debugbar\Facade as Debugbar;

Debugbar::info('Info message');
Debugbar::error('Error message');
Debugbar::warning('Warning message');
Debugbar::addMeasure('My custom timing', LARAVEL_START, microtime(true));

Ignition:

use Facade\Ignition\Facades\Flare;

Flare::report($exception);
Flare::addCustomData('key', 'value');
Flare::context('user', ['id' => 1]);
Flare::group('Custom Group', ['key' => 'value']);

Key Differences

  • Laravel Debugbar focuses on real-time debugging and performance analysis, while Ignition specializes in error reporting and handling.
  • Ignition provides a more user-friendly error page with interactive stack traces, while Laravel Debugbar offers a comprehensive toolbar for monitoring various aspects of the application.
  • Laravel Debugbar is more suitable for local development and debugging, whereas Ignition can be used in both development and production environments for error tracking and reporting.

Provides tools to manage errors and ease debugging PHP code

Pros of Error-Handler

  • Part of the Symfony ecosystem, integrating seamlessly with other Symfony components
  • Lightweight and focused specifically on error handling
  • Supports custom error pages and provides detailed debug information

Cons of Error-Handler

  • Less feature-rich compared to Ignition's extensive debugging tools
  • Lacks the interactive debugging interface that Ignition offers
  • May require more manual configuration for advanced use cases

Code Comparison

Error-Handler:

use Symfony\Component\ErrorHandler\ErrorHandler;

ErrorHandler::register();

Ignition:

use Facade\Ignition\Ignition;

Ignition::make()->register();

Summary

Error-Handler is a lightweight error handling component that integrates well with the Symfony ecosystem. It provides essential error handling functionality but lacks some of the advanced features and user-friendly interface found in Ignition.

Ignition offers a more comprehensive debugging experience with its interactive interface and extensive toolset. However, it may be considered overkill for simpler projects or those already using the Symfony framework.

The choice between the two depends on the specific project requirements, existing technology stack, and the level of debugging capabilities needed.

The official Laravel SDK for Sentry (sentry.io)

Pros of Sentry-Laravel

  • Provides advanced error tracking and performance monitoring across multiple platforms
  • Offers real-time alerts and detailed error reports with stack traces
  • Integrates seamlessly with Laravel's error handling system

Cons of Sentry-Laravel

  • Requires a Sentry account and may incur costs for larger projects
  • More complex setup process compared to Ignition
  • May have a steeper learning curve for beginners

Code Comparison

Sentry-Laravel setup:

use Sentry\Laravel\Facade;

Sentry::captureException($exception);

Ignition usage:

use Facade\Ignition\Exceptions\ViewException;

throw new ViewException('Custom error message');

Key Differences

  • Sentry-Laravel focuses on comprehensive error tracking and performance monitoring across multiple environments
  • Ignition provides a more user-friendly, local development-oriented error page with inline editing capabilities
  • Sentry-Laravel offers broader language and framework support, while Ignition is tailored specifically for Laravel
  • Ignition is free and open-source, whereas Sentry-Laravel may require a paid plan for larger projects

Both tools serve different purposes: Sentry-Laravel excels in production error tracking and monitoring, while Ignition shines in local development environments with its interactive error pages and debugging tools.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Ignition: a beautiful error page for Laravel apps

Latest Version on Packagist Tests Total Downloads

Ignition is a beautiful and customizable error page for Laravel applications running on Laravel 5.5 up Laravel 8. It is the default error page for all Laravel 6 applications. It also allows to publicly share your errors on Flare. If configured with a valid Flare API key, your errors in production applications will be tracked, and you'll get notified when they happen.

Using Laravel 8 or above?

If you're on Laravel 8 or above, you can switch to spatie/laravel-ignition, which is a drop-in replacement. Replace facade/ignition with "spatie/laravel-ignition": "^1.0" in your application's composer.json file.

Going forward, we'll only add security fixes to facade/ignition and highly encourage you to switch to spatie/laravel-ignition.

Official Documentation

The official documentation for Ignition can be found on the Flare website.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see License File for more information.