/** * Show the form for creating a new resource. * * @return Response */ public function create() { $produit = new Produit(); $produits = $produit->getAll(); $matiere = new Matiere(); $matieres = $matiere->getAll(); return view('produit.create')->with('produits', $produits)->with('matieres', $matieres); }
public function getAll() { $prod = new Produit(); $results = $prod->getAll(); return Response()->json($results->toArray(), 200); }