Пример #1
0
 /**
  * 博客首页
  */
 public function index()
 {
     $object = new \stdClass();
     $object->category = (int) Request::input('category');
     $object->tag = (int) Request::input('tag');
     $contentModel = new ContentModel();
     $articleList = $contentModel->activeArticleInfo($object);
     $page = $articleList->setPath('')->appends(Request::all())->render();
     return response(view('home.index.index', compact('articleList', 'page', 'object')));
 }
Пример #2
0
 /**
  * 博客首页
  */
 public function index()
 {
     $object = new \stdClass();
     $object->category = (int) Request::input('category');
     $object->tag = (int) Request::input('tag');
     $contentModel = new ContentModel();
     $articleList = $contentModel->activeArticleInfo($object);
     $page = $articleList->setPath('')->appends(Request::all())->render();
     $cacheSecond = config('home.cache_control');
     $time = date('D, d M Y H:i:s', time() + $cacheSecond) . ' GMT';
     return response(view('home.index.index', compact('articleList', 'page', 'object')))->header('Cache-Control', 'max-age=' . $cacheSecond)->header('Expires', $time);
 }