/** * Show the form for dispatching the resource to the bench. * * @return Response */ public function dispatch($id) { $topupRequest = TopupRequest::find($id); $batches = Receipt::where('commodity_id', '=', $topupRequest->commodity_id)->lists('batch_no', 'id'); $users = User::where('id', '!=', Auth::user()->id)->lists('name', 'id'); return View::make('issue.create')->with('topupRequest', $topupRequest)->with('users', $users)->with('batches', $batches); }
/** * Contains the testing sample data for the IssueController. * * @return void */ public function setVariables() { // Initial sample storage data $this->input = array('batch_no' => Receipt::find(1)->id, 'topup_request_id' => TopupRequest::find(1)->id, 'quantity_issued' => '20', 'receivers_name' => 'Lab2', 'remarks' => 'first issue'); // Edition sample data $this->inputUpdate = array('batch_no' => Receipt::find(1)->id, 'topup_request_id' => TopupRequest::find(1)->id, 'quantity_issued' => '20', 'receivers_name' => 'Lab2', 'remarks' => 'first issue'); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function delete($id) { //Soft delete the patient $commodity = TopupRequest::find($id); $commodity->delete(); // redirect return Redirect::route('topup.index')->with('message', 'The commodity was successfully deleted!'); }