/** * Show the form for creating a new resource. * * @return Response */ public function create() { $receipts = Receipt::all(); $commodities = Commodity::has('receipts')->lists('name', 'id'); $sections = TestCategory::all()->lists('name', 'id'); return View::make('topup.create')->with('receipts', $receipts)->with('sections', $sections)->with('commodities', $commodities); }
/** * 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::make('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() { $receipts = Receipt::all(); return View::make('receipt.index')->with('receipts', $receipts); }