Route::get('/clear-config', function() { $exitCode = Artisan::call('config:clear'); // return what you want });