spatie/laravel-ignition

repository·main·Indexed 20 days ago

https://github.com/spatie/laravel-ignition

A customizable error page for Laravel applications providing detailed error reporting and integration with Flare for production tracking. Includes tools for creating custom solution classes via ignition:make-solution and solution providers via ignition:make-solution-provider, as well as a flare:test command to verify Flare API configuration and connectivity.

Tokens
633
Snippets
4
Records
5
Agent score
20%

What's inside spatie/laravel-ignition

  1. Install Ignition for Laravel

    main

    Ignition provides a beautiful and customizable error page for Laravel applications.

    Compatibility Requirements:

    • Laravel 10+ and PHP 8.1+: Use spatie/laravel-ignition (v2.0+).
    • Laravel 8 or 9: Use spatie/laravel-ignition (v1.x).
    • Laravel 5.x, 6.x, 7.x or older PHP versions: Use facade/ignition instead.

    If you configure Ignition with a valid Flare API key, it can also track and notify you of errors in production via Flare.

  2. Test Flare integration with flare:test

    main

    Use the flare:test command to verify that your Laravel application is correctly configured to send exceptions to Flare.

    The command performs several validation checks:

    1. Flare Key: Ensures flare.key is set in your configuration.
    2. Logging Configuration: Verifies that your default logging channel includes the flare channel and that a flare channel exists with the flare driver.
    3. PHP Settings: Checks if zend.exception_ignore_args is enabled, which can prevent stack trace arguments from being sent.
    4. Connectivity: Attempts to send a real test exception to the Flare API.

    If the command fails, it will output diagnostic information including your platform details (PHP version, Laravel version, etc.) and suggest checking your Flare subscription or the Flare status page.

    php artisan flare:test
  3. Create a new custom Ignition solution class with ignition:make-solution

    main

    Use the ignition:make-solution command to generate a new custom Ignition solution class. By default, the command creates a standard solution class in the App\Solutions namespace.

    If you need to create a solution that is specifically designed to be executable (a runnable solution), use the --runnable flag. This will use a different stub template for the generated class.

    php artisan ignition:make-solution MyCustomSolution
    
    # To create a runnable solution
    php artisan ignition:make-solution MyRunnableSolution --runnable