*/ protected $fillable = [ 'vault_id', 'address_type_id', 'line_1', 'line_2', 'city', 'province', 'postal_code', 'country', 'latitude', 'longitude', ]; /** * Get the contacts associated with the address. * * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany<\App\Models\Contact, $this> */ public function contacts(): BelongsToMany { return $this->belongsToMany(Contact::class, 'contact_address') ->withPivot('is_past_address'); } /** * Get the address type object associated with the address. * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo<\App\Models\AddressType, $this> */ public function addressType(): BelongsTo { return $this->belongsTo(AddressType::class); } /** * Get the address's feed item. * * @return \Illuminate\Database\Eloquent\Relations\MorphOne<\App\Models\ContactFeedItem, $this> */ public function feedItem(): MorphOne { return $this->morphOne(ContactFeedItem::class, 'feedable'); } }