*/ public function contacts(): BelongsToMany { return $this->belongsToMany(Contact::class, 'contact_contact_group') ->withTimestamps(); } /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'is_favorite' => 'boolean', 'synced_at' => 'datetime', ]; } }