Question : laravel clear route cache
Answered by : der-divyaraj
php artisan cache:clear
php artisan route:cache
Source : | Last Update : Thu, 18 Mar 21
Question : clear cache via route laravel
Answered by : sujay-patel
//Clear Cache facade value:
Route::get('/clear-cache', function() { $exitCode = Artisan::call('cache:clear'); return '<h1>Cache facade value cleared</h1>';
});
//Reoptimized class loader:
Route::get('/optimize', function() { $exitCode = Artisan::call('optimize'); return '<h1>Reoptimized class loader</h1>';
});
//Route cache:
Route::get('/route-cache', function() { $exitCode = Artisan::call('route:cache'); return '<h1>Routes cached</h1>';
});
//Clear Route cache:
Route::get('/route-clear', function() { $exitCode = Artisan::call('route:clear'); return '<h1>Route cache cleared</h1>';
});
//Clear View cache:
Route::get('/view-clear', function() { $exitCode = Artisan::call('view:clear'); return '<h1>View cache cleared</h1>';
});
//Clear Config cache:
Route::get('/config-cache', function() { $exitCode = Artisan::call('config:cache'); return '<h1>Clear Config cleared</h1>';
});
Source : https://stackoverflow.com/questions/31455829/laravel-5-clear-cache-in-shared-hosting-server | Last Update : Mon, 21 Jun 21
Question : php artisan route cache
Answered by : different-dog-pt1bgfgo7yfx
If you want to remove the routes cache on your server, remove this file:
bootstrap/cache/routes.php
And if you want to update it just run php artisan route:cache
and upload the bootstrap/cache/routes.php to your server.
Source : | Last Update : Wed, 23 Feb 22