src/Models/Address.php
public function getCountryCodeAttribute($digits = 2)
    {
        if (! $this->country)
            return '';

        if ($digits === 3)
            return $this->country->iso_3166_3;

        return $this->country->iso_3166_2;
    }
public function getCountryCodeAttribute($digits = 2)
    {
        if (! $this->country)
            return '';

        if ($digits === 3)
            return $this->country->iso_3166_3;

        return $this->country->iso_3166_2;
    }
public function getCountryCodeAttribute ( $ digits = 2 ) { if ( ! $ this -> country ) return '' ; if ( $ digits === 3 ) return $ this -> country -> iso_3166_3 ; return $ this -> country -> iso_3166_2 ; }
Get the country code.

@param  int  $digits
@return string
Get the country code .