/** * 所有评论 * * @return Response */ public function getAll() { $comments = Comment::paginate(15); return View::make('backend.pages.comment-all')->withComments($comments); }
/** * Display a listing of the resource. */ public function index() { return json()->withPagination(\App\Comment::paginate(5), new CommentTransformer()); }