country = (new Customers)->getISOCountry($customer->country); }); static::updating(function ($customer) { $customer->country = (new Customers)->getISOCountry($customer->country); }); } private function getISOCountry($country) { switch ($country) { case 'Belgique': return 56; break; case 'Luxembourg': return 442; break; default: return 250; //France } } }