示例#1
0
 /**
  * Execute the command.
  *
  * @param CountryRepository $countries
  * @return Country
  */
 public function handle(CountryRepository $countries)
 {
     $country = $countries->findById($this->id)->fill($this->getProperties());
     $countries->save($country);
     return $country;
 }
 /**
  * Execute the command.
  *
  * @param CountryRepository $countries
  * @return Country
  */
 public function handle(CountryRepository $countries)
 {
     $country = Country::register($this->iso_code_2, $this->name);
     $countries->save($country);
     return $country;
 }