/** * Display a listing of the resource. * * @return Response */ public function index() { // $comments = Comment::get(); $comments->load('user', 'posts'); return view('admin.comments.index', compact('comments')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $comments = Comment::get(); $this->json_or_dd($comments->toArray()); }
/** * Send back all comments as JSON * * @return Response */ public function index() { return response()->json(Comment::get()); }
/** * Display a listing of the resource. * * @return Response */ public function index() { return Response::json(Comment::get()); }
public function getall() { return Comment::get(); }