Runnable solutions | laravel-error-solutions | Spatie

 SPATIE

  Laravel Error Solutions
==========================

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Laravel-error-solutions](https://spatie.be/docs/laravel-error-solutions/v1)  Basic-usage  Runnable solutions

 Version   v1

 Other versions for crawler [v1](https://spatie.be/docs/laravel-error-solutions/v1)

- [ Introduction ](https://spatie.be/docs/laravel-error-solutions/v1/introduction)
- [ Support us ](https://spatie.be/docs/laravel-error-solutions/v1/support-us)
- [ Requirements ](https://spatie.be/docs/laravel-error-solutions/v1/requirements)
- [ Installation &amp; setup ](https://spatie.be/docs/laravel-error-solutions/v1/installation-setup)
- [ Questions and issues ](https://spatie.be/docs/laravel-error-solutions/v1/questions-issues)
- [ Changelog ](https://spatie.be/docs/laravel-error-solutions/v1/changelog)
- [ About us ](https://spatie.be/docs/laravel-error-solutions/v1/about-us)

Basic usage
-----------

- [ Displaying solutions ](https://spatie.be/docs/laravel-error-solutions/v1/basic-usage/displaying-solutions)
- [ Runnable solutions ](https://spatie.be/docs/laravel-error-solutions/v1/basic-usage/runnable-solutions)
- [ AI powered solutions ](https://spatie.be/docs/laravel-error-solutions/v1/basic-usage/ai-powered-solutions)

Creating your own solutions
---------------------------

- [ Introduction ](https://spatie.be/docs/laravel-error-solutions/v1/creating-your-own-solutions/introduction)
- [ Creating a solution class ](https://spatie.be/docs/laravel-error-solutions/v1/creating-your-own-solutions/creating-a-solution-class)
- [ On exceptions ](https://spatie.be/docs/laravel-error-solutions/v1/creating-your-own-solutions/on-exceptions)
- [ Via a solution provider ](https://spatie.be/docs/laravel-error-solutions/v1/creating-your-own-solutions/via-a-solution-provider)

 Runnable solutions
==================

###  On this page

1. [ A note on security ](#content-a-note-on-security)

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:

![image](/docs/laravel-error-solutions/v1/images/runnable-solution.png)

If you don't want to use runnable solutions, you can disable them by setting the `enable_runnable_solutions` key to `false` in the config file.

A note on security
--------------------------------------------------------------------------------------------------------------

Runnable solutions will only be available in local development environments.

Under the hood, the package uses the `Spatie\LaravelErrorSolutions\Support\RunnableSolutionsGuard` class to determine if the app is running locally.

To have more control over the behaviour, you can extend this class and override its methods. You must set the `runnable_solutions_guard` key in the config file to your custom class.
