Ejemplo n.º 1
0
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     $commodities = Commodity::lists('name', 'id');
     $suppliers = Supplier::lists('name', 'id');
     return view('receipt.create')->with('commodities', $commodities)->with('suppliers', $suppliers);
 }
Ejemplo n.º 2
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     //	Get suppliers for select list
     $suppliers = Supplier::lists('name', 'id');
     //	Get stock
     $stock = Stock::find($id);
     //	Get initially saved supplier
     $supplier = $stock->supplier_id;
     //Open the Edit View and pass to it the $stock
     return view('inventory.stock.edit')->with('stock', $stock)->with('supplier', $supplier)->with('suppliers', $suppliers);
 }