php artisan clear:config code example
Example 1: config clear laravel
php artisan config:clear
Example 2: config clear without artisan
Route::get('/clear-config', function() {
$exitCode = Artisan::call('config:clear');
// return what you want
});