app/Http/Controllers/CommentsController.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::orderBy('created_at', 'asc')->get();
       return view('comments', ['comments'=>$comments]);
    }
public function index ( ) { $ comments = Comment :: orderBy ( 'created_at' , 'asc' ) -> get ( ) ; return view ( 'comments' , [ 'comments' => $ comments ] ) ; }
Display a listing of the resource.
Display a listing of the resource .