/** * Execute the command. * * @param ShippingRuleRepository $rules * @return ShippingRule */ public function handle(ShippingRuleRepository $rules) { $rule = $rules->findById($this->id)->fill($this->getProperties()); $rules->save($rule); return $rule; }
/** * Execute the command. * * @param ShippingRuleRepository $rules * @return ShippingRule */ public function handle(ShippingRuleRepository $rules) { $rule = ShippingRule::register($this->carrier_id, $this->country_id); $rules->save($rule); return $rule; }