app/Http/Controllers/API/CommentController.php
/**
    * Display a listing of the resource.
    *
    * @return \Illuminate\Http\Response
    */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
  {
    $comments = Comment::all();
    return response()->json($comments);
  }
public function index ( ) { $ comments = Comment :: all ( ) ; return response ( ) -> json ( $ comments ) ; }
Display a listing of the resource.
Display a listing of the resource .