/** * Display a listing of the resource. * * @return Response */ public function index() { // $model = Comment::orderBy('id', 'DESC')->paginate(10); return backendView('index', ['commentList' => $model]); }
/** * Display a listing of the resource. * * Trả về list các comments */ public function index() { return Response::json(Comment::orderBy('id', 'desc')->get()); }