/**
  * 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'));
 }
Пример #2
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $comments = Comment::get();
     $this->json_or_dd($comments->toArray());
 }
Пример #3
0
 /**
  * Send back all comments as JSON
  *
  * @return Response
  */
 public function index()
 {
     return response()->json(Comment::get());
 }
Пример #4
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     return Response::json(Comment::get());
 }
Пример #5
0
 public function getall()
 {
     return Comment::get();
 }