/** * Execute the command. * * @param VatRateRepository $vat_rates * @return VatRate */ public function handle(VatRateRepository $vat_rates) { $vat_rate = $vat_rates->findById($this->id)->fill($this->getProperties()); $vat_rates->save($vat_rate); return $vat_rate; }
/** * Execute the command. * * @param VatRateRepository $vat_rates * @return VatRate */ public function handle(VatRateRepository $vat_rates) { $vat_rate = VatRate::register($this->description, $this->rate); $vat_rates->save($vat_rate); return $vat_rate; }