https://github.com/spatie/laravel-error-solutions
Display solutions on the Laravel error page
https://github.com/spatie/laravel-error-solutions
error laravel solutions
Last synced: about 1 year ago
JSON representation
Display solutions on the Laravel error page
- Host: GitHub
- URL: https://github.com/spatie/laravel-error-solutions
- Owner: spatie
- License: mit
- Created: 2024-06-11T11:52:05.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-26T07:15:23.000Z (about 1 year ago)
- Last Synced: 2025-04-13T07:48:55.814Z (about 1 year ago)
- Topics: error, laravel, solutions
- Language: PHP
- Homepage: https://spatie.be/docs/laravel-error-solutions
- Size: 581 KB
- Stars: 79
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Support: docs/support-us.md
Awesome Lists containing this project
README
# Display solutions on the Laravel error page
[](https://packagist.org/packages/spatie/laravel-error-solutions)
[](https://github.com/spatie/laravel-error-solutions/actions?query=workflow%3Arun-tests+branch%3Amain)
[](https://github.com/spatie/laravel-error-solutions/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[](https://packagist.org/packages/spatie/laravel-error-solutions)
This package can display solutions on the Laravel error page. Here's how it looks:

For some solutions, the package will display a button that will automatically run the solution. Here's how that looks when you forget to set an `APP_KEY` in your `.env` file:

## Support us
[
](https://spatie.be/github-ad-click/laravel-error-solutions)
We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).
## Installation
You can install the package via composer:
```bash
composer require --dev spatie/laravel-error-solutions
```
You can publish the config file with:
```bash
php artisan vendor:publish --tag="error-solutions-config"
```
This is the contents of the published config file:
```php
return [
/**
* Display solutions on the error page
*/
'enabled' => true,
/**
* Enable or disable runnable solutions.
*
* Runnable solutions will only work in local development environments,
* even if this flag is set to true.
*/
'enable_runnable_solutions' => true,
/**
* This class is responsible for determining if a solution is runnable.
*
* In most cases, you can use the default implementation.
*/
'runnable_solutions_guard' => Spatie\LaravelErrorSolutions\Support\RunnableSolutionsGuard::class,
];
```
Optionally, you can publish the views using
```bash
php artisan vendor:publish --tag="error-solutions-views"
```
## Usage
You can find full documentation on how to use this package on [our documentation site](https://spatie.be/docs/laravel-error-solutions/v1/introduction).
## Testing
```bash
composer test
```
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [Freek Van der Herten](https://github.com/freekmurze)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.