belongsTo( TaxClass::class, 'class_id', 'id' ); } public function getFormattedStateAttribute() { if (!empty($this->state)) { return AddressHelper::getStateNameByCode($this->state, $this->country); } return ''; } }