- How do I install Ignition in a Laravel project?
- For Laravel, use `composer require spatie/laravel-ignition` instead of the base package. It auto-registers via Laravel’s service provider. For vanilla PHP, use `composer require spatie/ignition` and call `Ignition::make()->register()` in your bootstrap file.
- Does Ignition work with Laravel 10+?
- Yes, Ignition is officially tested and supported for Laravel 8+. The `laravel-ignition` package includes Laravel-specific optimizations like `APP_ENV` detection, ensuring compatibility with newer Laravel versions.
- Can I customize the error page design?
- Absolutely. Ignition supports dark mode by default and allows customization via CSS overrides. You can also extend the UI by adding custom solution panels or modifying the React-based frontend components.
- Will Ignition slow down my production app?
- No. Ignition’s UI is lazy-loaded only when errors occur, and it respects `APP_ENV`. Disable it in production entirely by calling `Ignition::disable()` or configure `shouldDisplayException()` to return `false` for non-development environments.
- How does Ignition handle sensitive data in errors?
- Ignition automatically censors sensitive data like request bodies, passwords, and API keys. For additional security, use Flare’s `runningInProductionEnvironment()` checks or implement custom data sanitization via `addSolutionProviders()`.
- Can I integrate Ignition with Sentry or Bugsnag?
- Yes, Ignition is designed to complement monitoring tools. Use `sendToFlare()` selectively for critical errors or disable Ignition’s UI in production while keeping Flare (or Sentry) active for background logging.
- What are the AI-powered solutions in Ignition?
- Ignition can suggest fixes for exceptions using OpenAI’s API (via `openai-php/client`). Enable it with `Ignition::make()->withAI()` and configure your OpenAI key in `.env`. Cache responses with `useCache()` to reduce latency.
- How do I add custom solutions for specific exceptions?
- Implement the `ProvidesSolution` interface in your custom exception handler or create a `SolutionProvider` class. Register it via `Ignition::make()->addSolutionProviders()` to display tailored fixes for your app’s exceptions.
- Is Ignition safe to use in shared hosting?
- Yes, but ensure your hosting supports JavaScript (Ignition’s UI is React-based). Disable Ignition in production by checking `app()->environment('local')` or use `Ignition::disable()` to avoid exposing debug pages.
- What’s the difference between `spatie/ignition` and `spatie/laravel-ignition`?
- `spatie/ignition` is framework-agnostic and works for any PHP app. `spatie/laravel-ignition` is a Laravel-specific wrapper that integrates seamlessly with Laravel’s exception handler, auto-configures dark mode, and includes Laravel-specific optimizations like `APP_ENV` checks.