use Illuminate\Support\Facades\Config; // Set the app environment to production Config::set('app.env', 'production');
use Illuminate\Support\Facades\Config; // Set multiple values at once Config::set([ 'app.env' => 'production', 'app.debug' => false, 'database.connections.mysql.host' => 'localhost', ]);This will set the `env` value to `production`, `debug` value to `false` in the `app.php` configuration file and will also set the `host` value to `localhost` in the `database.php` configuration file. Package library: `Illuminate\Support\Facades\Config` is part of the `illuminate/support` package which is a core package of Laravel framework.