예제 #1
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     return View::make($this->getView('index'))->withArticles(Article::all());
 }
 /**
  * @param  Article $article
  * @return \Illuminate\View\View
  */
 public function getIndex()
 {
     $articles = $this->article->all();
     return view('articles.index')->with(compact('articles'));
 }
예제 #3
0
 /**
  * 显示文章管理首页
  * @return $this
  */
 public function index()
 {
     $models = Article::all(['article_id', 'admin_id', 'column_id', 'title', 'created_at']);
     $models->load(['admin', 'column']);
     return $this->view('index')->with('models', $models);
 }