Index.php 654 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php namespace App\Http\Controllers\Admin;
  2. use Illuminate\Support\Facades\Cache;
  3. /**
  4. * 后台控制器
  5. *
  6. * @author 刘相欣
  7. *
  8. * */
  9. class Index extends Auth{
  10. public function index()
  11. {
  12. // 获取菜单
  13. $this->getMenu('admin');
  14. // 请求结果
  15. return $this->fetch();
  16. }
  17. /**
  18. * 欢迎页
  19. *
  20. * */
  21. public function welcome()
  22. {
  23. // 加载模板
  24. return $this->fetch();
  25. }
  26. /**
  27. * 清理缓存
  28. *
  29. * */
  30. public function refresh()
  31. {
  32. // 清除缓存
  33. Cache::flush();
  34. // 加载模板
  35. return json_send(['code'=>'success','msg'=>'刷新成功']);
  36. }
  37. }