예제 #1
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     //
     $sys_log = $this->log->getById($id);
     is_null($sys_log) && abort(404);
     if (!Cache::has('system_operation')) {
         $ret = SettingCache::cacheSetting('system_operation', 'array');
         if ($ret) {
             $sys_op = Cache::get('system_operation');
         } else {
             //缓存数据出错,抛出异常
             return view('back.exceptions.jump', ['exception' => '数据缓存异常,请联系网站管理员!']);
         }
     } else {
         $sys_op = Cache::get('system_operation');
     }
     return view('back.system_log.show', compact('sys_log', 'sys_op'));
 }
예제 #2
0
 /**
  * 重建系统缓存
  * 更新内容或者刚安装完本CMS之后,如果数据显示异常,请执行本方法
  *
  * @return Response
  */
 public function getRebuildCache()
 {
     SystemOptionCache::cacheStatic();
     DataCache::rebuildDataCache();
     SettingCache::uncacheSetting();
     return view('back.cache.index');
 }