无涯教程: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");
});


https://www.learnfk.com/article-laravel-8-clear-cache-of-route-view-config-command-exampleexample

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章