diff --git a/config/boost.php b/config/boost.php index 95973c7c..bbbfa687 100644 --- a/config/boost.php +++ b/config/boost.php @@ -3,6 +3,18 @@ declare(strict_types=1); return [ + /* + |-------------------------------------------------------------------------- + | Boost Master Switch + |-------------------------------------------------------------------------- + | + | This option may be used to disable all Boost functionality, which + | simply provides a single and convenient way to enable or disable + | Boost's AI development tools. + | + */ + + 'enabled' => env('BOOST_ENABLED', true), /* |-------------------------------------------------------------------------- diff --git a/src/BoostServiceProvider.php b/src/BoostServiceProvider.php index 1eed63d1..adcf83f1 100644 --- a/src/BoostServiceProvider.php +++ b/src/BoostServiceProvider.php @@ -55,6 +55,10 @@ public function register(): void public function boot(Router $router): void { + if (! config('boost.enabled', true)) { + return; + } + // Only enable Boost on local environments if (! app()->environment(['local', 'testing']) && config('app.debug', false) !== true) { return;