/** * Display a listing of the resource. * * @return Response */ public function index() { return view('admin.comments.index')->withComments(Comment::all()); }
/** * 显示评论列表页 * @return $this */ public function index() { $models = Comment::all(['comment_id', 'content', 'user_id', 'article_id', 'created_at']); $models->load(['user', 'article']); return $this->view('index')->with('models', $models); }