public function update(UpdatePaymentRequest $request)
 {
     $input = $request->input();
     if (!$this->checkUpdatePermission($input, $response)) {
         return $response;
     }
     $payment = $this->paymentRepo->save($input);
     Session::flash('message', trans('texts.updated_payment'));
     return redirect()->to($payment->getRoute());
 }
 public function update(UpdatePaymentRequest $request)
 {
     $input = $request->input();
     $payment = $this->paymentRepo->save($input);
     Session::flash('message', trans('texts.updated_payment'));
     return redirect()->to($payment->getRoute());
 }
 /**
  * @SWG\Delete(
  *   path="/payments/{payment_id}",
  *   summary="Delete a payment",
  *   tags={"payment"},
  *   @SWG\Parameter(
  *     in="body",
  *     name="body",
  *     @SWG\Schema(ref="#/definitions/Payment")
  *   ),
  *   @SWG\Response(
  *     response=200,
  *     description="Delete payment",
  *      @SWG\Schema(type="object", @SWG\Items(ref="#/definitions/Payment"))
  *   ),
  *   @SWG\Response(
  *     response="default",
  *     description="an ""unexpected"" error"
  *   )
  * )
  */
 public function destroy(UpdatePaymentRequest $request)
 {
     $payment = $request->entity();
     $this->clientRepo->delete($payment);
     return $this->itemResponse($payment);
 }