예제 #1
0
 public function edit($id)
 {
     $price_log = PriceLog::find($id);
     $supplierOptions = Supplier::lists('name', 'id');
     $itemOptions = Item::lists('name', 'id');
     $availability = ['1' => 'Yes', '0' => 'No'];
     $date = $price_log->date;
     return view('price_logs.edit', compact('date', 'availability', 'price_log', 'supplierOptions', 'itemOptions'));
 }
예제 #2
0
 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     $suppliers = Supplier::lists('name', 'id')->all();
     $items = Item::lists('name', 'id')->all();
     return view('orders.create', compact('suppliers', 'items'));
 }
예제 #3
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $receivings = Receiving::orderBy('id', 'desc')->first();
     $suppliers = Supplier::lists('company_name', 'id');
     return view('receiving.index')->with('receiving', $receivings)->with('supplier', $suppliers);
 }