clear config cache laravel code example
Example 1: laravel clear cache
php artisan cache:clear
php artisan route:clear
php artisan config:clear
php artisan view:clear
Example 2: config clear laravel
php artisan config:clear
Example 3: laravel disable config cache
php artisan cache:clear - Flush the application cache
php artisan config:cache - Create a cache file for faster configuration loading. This is for configuration cache. This command will clear the configuration cache before it creates. More details
php artisan config:clear - Remove the configuration cache file
Example 4: laravel clear cache
php artisan cache:clear
php artisan route:clear
php artisan config:clear
php artisan optimize
Example 5: clear laravel cache
php artisan view:clear
php artisan cache:clear
php artisan route:clear
php artisan config:clear
php artisan optimize
Example 6: clear cache in laravel without artisan
Route::get('/clear-cache', function() {
$exitCode = Artisan::call('cache:clear');
return 'Application cache cleared';
});