I am creating a project in php and want to configure it with my Neo4j graph data. Here is the code:
<?php
require_once '/path/to/Client.php';
use GraphAware\Neo4j\Client;
use GraphAware\Neo4j\Client\ClientBuilder;
$client = new GraphAware\Neo4j\Client('http://127.0.0.1:7474/');
$client = ClientBuilder::create()
->addConnection('default', 'http://neo4j:password@127.0.0.1:7474')
->addConnection('bolt', 'bolt://neo4j:password@127.0.0.1:7474')
->build();
so you can see that the library I am trying to use in GraphAware. I cannot get this library to work as I do not have it. Can someone please let me know how I can get this library in my php project which I am creating in eclipse.
As per the documentation, you use Composer to require it into your project.
https://github.com/graphaware/neo4j-php-client#installation
composer require graphaware/neo4j-php-client:^4.0
Don't have composer? It's well worth installing, manages dependencies and autoloading, and all you need to do to get it working with any PHP project is to add this line pretty much at the start point of your script (index.php?)
require_once 'vendor/autoload.php`
Get Composer here https://getcomposer.org/
The lame non-composer way is just download the Zip from github and dump it in your project. But you'll need to require in all the classes you use!