首页 > IT职业 > IT生活 > Laravel 8 - 路由指令介绍
这篇文章将为您提供laravel 8清除缓存的示例,您将学习laravel 8清除缓存配置。
清除缓存:
php artisan cache:clear
清除路由缓存:
php artisan route:cache
清除视图缓存:
php artisan view:clear
清除配置缓存:
php artisan config:cache
您也可以在路由中调用Artisan::call清除命令缓存。因此您可以像下面这样创建路由:
Route::get('/clear-cache-all', function() {
Artisan::call('cache:clear');
dd("Cache Clear All");
});
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2471/viewspace-2797046/ ,如需转载,请注明出处,否则将追究法律责任。