whereType($type); } public function user(): HasOne { return $this->hasOne(User::class, 'id', 'user_id'); } }