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