/** * Display the specified resource. * GET /ingredients/{id} * * @param int $id * @return Response */ public function show($id) { $prod_unit_obj = new ProductionUnit(); $units = $prod_unit_obj->showUnitTypes($id); $ingredient = $this->stock->findOrFail($id); $supplier = $this->supplier->findOrFail($ingredient->supplier_id); return View::make('stocks.show')->with('ingredient', $ingredient)->with('units', $units)->with('supplier', $supplier)->with('title', $ingredient->name . ' | Ingredient details'); }
public function showUnitTypes($ingredient_id) { $prod_unit_obj = new ProductionUnit(); $units = $prod_unit_obj->showUnitTypes($ingredient_id); return View::make('inventory.unit-types')->with('title', 'Unit types')->with('units', $units); }