whereKey($userId)->value('password'); return $hash === null ? null : (string) $hash; } public function pinHashOf(int $userId): ?string { $hash = User::query()->whereKey($userId)->value('pin_hash'); return $hash === null ? null : (string) $hash; } public function storePinHash(int $userId, ?string $hash): void { User::query()->whereKey($userId)->update(['pin_hash' => $hash]); } }