コード例 #1
0
 /**
  * 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;
 }
コード例 #2
0
 /**
  * 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;
 }