/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { $receipt = Receipt::find($id); $suppliers = Supplier::all()->lists('name', 'id'); $commodities = Commodity::all()->lists('name', 'id'); return View::make('receipt.edit')->with('receipt', $receipt)->with('commodities', $commodities)->with('suppliers', $suppliers); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { // $issue = Issue::find($id); $commodities = Commodity::all()->lists('name', 'id'); $batches = Receipt::all()->lists('batch_no', 'id'); $users = User::where('id', '!=', Auth::user()->id)->lists('name', 'id'); $sections = TestCategory::all()->lists('name', 'id'); //To DO:create function for this $available = $issue->topupRequest->commodity->available(); return view('issue.edit')->with('commodities', $commodities)->with('available', $available)->with('users', $users)->with('sections', $sections)->with('issue', $issue)->with('batches', $batches); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $commodities = Commodity::all(); return View::make('commodity.index')->with('commodities', $commodities); }