/** * Handles the command. * * @param EditRejectReasonCommand $command */ public function handle($command) { $rejectReason = $this->rejectReasonRepo->getReasonByID($command->id); $rejectReason->reason = $command->reason; $rejectReason->form_type = $command->form_type; $rejectReason->process_type = $command->process_type; $saveEdit = $this->rejectReasonRepo->save($rejectReason); if ($saveEdit) { return $saveEdit; } }
/** * Show the form for editing the specified resource. * GET /rejectreason/{id}/edit * * @param int $id * @return View */ public function edit($id) { $rejectReason = $this->rejectReasonRepo->getReasonByID($id); $onlineForms = $this->onlineForms; $processes = $this->processes; return View::make('admin.edit.rejectreason', ['pageTitle' => 'Edit Reject Reason'], compact('rejectReason', 'onlineForms', 'processes')); }