Example #1
0
 /**
  * @param string $rp_id
  * @param string $de_id
  * @param string $header_id
  *
  * @return mixed
  */
 public function coverageEdit($rp_id, $de_id, $header_id)
 {
     if (Cache::has(decode($header_id)) && $this->repository->getHeaderById(decode($header_id))) {
         $header = $this->repository->getModel();
         $data = $this->getData($rp_id);
         $data['policies'] = $this->policyRepository->getPolicyByCurrency(decode($rp_id), $header->currency);
         $data['payment_methods'] = $this->retailerProductRepository->getPaymentMethodsByProductById(decode($rp_id));
         return view('td.coverage.edit', compact('rp_id', 'de_id', 'header_id', 'header', 'data'));
     }
     return redirect()->back()->with(['error_header' => 'La cobertura no puede ser inicializada . ']);
 }