public function index() { //creation d'un objet du model Comments //$model = new Comments(); $comments = Comments::all(); //transporteur //transport des données du Controller à la vue return view("Comments/index", ['comments' => $comments]); }
/** * @return \Illuminate\View\View */ public function index() { return view('Comments/index', ['comments' => Comments::all()]); }