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