db = $db->getConnection(); } public function getAPIKeyUser(string $apiKeyUser): mixed { $result = $this->db->table('zp_user') ->where('username', $apiKeyUser) ->where('source', 'api') ->limit(1) ->first(); return $result ? (array) $result : false; } }