hasMany(UserAccount::class); } public function contacts() { return $this->hasMany(Contact::class); } public function owns($entity) { return ! empty($entity->user_id) && $entity->user_id == $this->id; } }