CacheController.php 651 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /****************************************************************
  3. * Author: libaojia
  4. * Date: 2017/7/12 上午10:57
  5. * Email: livsyitian@163.com
  6. * QQ: 995265288
  7. * User: 芸众商城 www.yunzshop.com
  8. ****************************************************************/
  9. namespace app\backend\controllers;
  10. use app\common\components\BaseController;
  11. class CacheController extends BaseController
  12. {
  13. protected $isPublic = true;
  14. public function update()
  15. {
  16. \Artisan::call('config:cache');
  17. \Artisan::call('view:clear');
  18. \Cache::flush();
  19. return $this->message('缓存更新成功');
  20. }
  21. }