/** * Envoie la liste de produit fini à la vue index. * * @return \Illuminate\Http\Response */ public function index() { try { $user = Auth::user(); $role = $user->role; $entrepots = Entrepot::All(); $produits = ProduitFini::All(); //$listeProduitsEntrepot = entrepot->pivot-> } catch (ModelNotFoundException $e) { App::abort(404); } return View::make('produitsFinis.index', compact('produits', 'role', 'entrepots')); }