country) { return null; } try { return Countries::getName( $this->country->code, app()->getLocale() ); } catch (\Exception $e) { return $this->country->name; } } public function user(): BelongsTo { return $this->belongsTo(User::class); } public function customer(): BelongsTo { return $this->belongsTo(Customer::class); } public function company(): BelongsTo { return $this->belongsTo(Company::class); } public function country(): BelongsTo { return $this->belongsTo(Country::class); } }