neo4j-4-laravel
neo4j-4-laravel copied to clipboard
How to run a cypher query?
Could you please show me running a cypher query using your neo4j-4-laravel?
Ref: https://github.com/jadell/neo4jphp/wiki/Cypher-and-gremlin-queries Ex: $client = new Everyman\Neo4j\Client(); $queryString = "START n=node(1) MATCH (n)<-[:KNOWS]-(x)-[:HAS]->() RETURN x";
$query = new Everyman\Neo4j\Cypher\Query($client, queryString); $result = $query->getResultSet();
I would love to know the answer to this question.
And the option of creating a new $client to run the query doesn't seem to be the best solution.
you can get the client using getFacadeRoot
$neo4j = \Artdarek\Neo4j\Facades\Neo4j::getFacadeRoot();
$query = new Everyman\Neo4j\Cypher\Query($neo4j, 'MATCH (n) RETURN n;');