PHPackages                             endyjasmi/neo4j - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. endyjasmi/neo4j

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

endyjasmi/neo4j
===============

Neo4j for PHP

3.0.0(11y ago)196987[2 issues](https://github.com/endyjasmi/neo4j/issues)[2 PRs](https://github.com/endyjasmi/neo4j/pulls)MITPHPPHP &gt;= 5.4

Since Aug 9Pushed 7y ago1 watchersCompare

[ Source](https://github.com/endyjasmi/neo4j)[ Packagist](https://packagist.org/packages/endyjasmi/neo4j)[ RSS](/packages/endyjasmi-neo4j/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (11)Versions (14)Used By (0)

\#Neo4j for PHP [![Gitter chat](https://camo.githubusercontent.com/c2d6901f5d0f2beae90d9bbd3bebbee6135dd4921ffda9e6ecce3b95243d1833/68747470733a2f2f6261646765732e6769747465722e696d2f656e64796a61736d692f6e656f346a2e706e67)](https://gitter.im/endyjasmi/neo4j)[![Build Status](https://camo.githubusercontent.com/52569a28c02084a21b88ea384413d5e9bf2150b3e487853e55aa553a64c64a49/68747470733a2f2f7472617669732d63692e6f72672f656e64796a61736d692f6e656f346a2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/endyjasmi/neo4j) [![Coverage Status](https://camo.githubusercontent.com/6ec9d2efff79412f20edc3b1308b236520ed11fb89d532639377a9d19b6b2d12/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f656e64796a61736d692f6e656f346a2f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/endyjasmi/neo4j?branch=master) [![SensioLabsInsight](https://camo.githubusercontent.com/70e503b732875d395c2448bc02650f9a2461ec26ad03e4dd887e909224bf985c/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f38353134316331632d373362392d346139652d626131342d6535653634306135386262392f6d696e692e706e67)](https://insight.sensiolabs.com/projects/85141c1c-73b9-4a9e-ba14-e5e640a58bb9) [![Latest Stable Version](https://camo.githubusercontent.com/3a5f18031eabddc8b1c30f6eba1fa72e1894612f392386867a130c1f8e4878f0/68747470733a2f2f706f7365722e707567782e6f72672f656e64796a61736d692f6e656f346a2f762f737461626c652e737667)](https://packagist.org/packages/endyjasmi/neo4j) [![Total Downloads](https://camo.githubusercontent.com/b5a77e48f82642bf57b469fc3a0187d421a36069518fe6a6fa9053c57d6a24b7/68747470733a2f2f706f7365722e707567782e6f72672f656e64796a61736d692f6e656f346a2f646f776e6c6f6164732e737667)](https://packagist.org/packages/endyjasmi/neo4j) [![License](https://camo.githubusercontent.com/ce6449124ff97da3d4e734fa419e9b22f0a640e33f007ae84d2f1863d328c915/68747470733a2f2f706f7365722e707567782e6f72672f656e64796a61736d692f6e656f346a2f6c6963656e73652e737667)](https://packagist.org/packages/endyjasmi/neo4j)

This is a neo4j cypher only php driver. The aim of this library is to make sending cypher query as easy as sending sql to the server. This library DOES NOT implement every rest endpoint of the server. Ohh, it also support laravel framework natively!

\###Why cypher only Following the development roadmap for neo4j graph database, cypher are going to be playing a huge role in communicating with the database. Hence, cypher query will be the future for neo4j. Hence, this library is designed with that in mind.

For more information about cypher query language, you can [refer to the official cypher query language documentation](http://neo4j.com/docs/stable/cypher-query-lang.html).

Most application programming interface(API) of this library are inspired by laravel database adapter.

Head first neo4j library? [go to wiki](https://github.com/endyjasmi/neo4j/wiki).

\##TL;DR

1. [Requirement](#requirement)
2. [Installation](#installation)
3. [Quickstart](#quickstart)
4. [Development](#development)
5. [Testing](#testing)
6. [Documentation](#documentation)
7. [Hall of fame](#hall-of-fame)
8. [Developer](#developer)
9. [License](#license)
10. [Feedback](#feedback)

\##Requirement

1. PHP 5.4 and above
2. Neo4j 2.0 and above
3. PHP Curl extension gi(highly recommended but optional)

If you are going to generate documentation with phpdocumentor (yes, it is integrated into the library) make sure that your machine can run phpdocumentor. [Here is a list of requirement for phpdocumentor](http://phpdoc.org/docs/latest/getting-started/installing.html).

\##Installation This library can be installed through composer. Just add the following to your `composer.json` and run `composer install`.

```
{
	"require": {
		"endyjasmi/neo4j": "2.*"
	}
}
```

\##Quickstart Here is the easiest way to get started.

```
require 'vendor/autoload.php';

$neo4j = new \EndyJasmi\Neo4j;

$result = $neo4j->match('(n:Person)')
	->output('n', 'person')
	->run();

var_dump($result[0]['n']);
```

The `statement` method above will return a result instance which contains an array of rows returned from the server.

`$result[0]['n']` dumped above means that you want to get the first row and column `n` of the result. Columns name are determined from the cypher query where in this case, the query `return n` means return n.

Of course, this is but a basic usage. For more advance feature, do [refer to the wiki](https://github.com/endyjasmi/neo4j/wiki).

\##Development ###Testing In order to test this library, you can `git clone https://github.com/endyjasmi/neo4j.git`. Right at the root, you must `composer install --dev`. After that you can start testing manually by typing `vendor/bin/phpunit`.

In case you want to do a continuous test driven development(TDD), you can `npm install` from the root directory(you'll need nodejs installed). Then you can run `grunt` from the root directory. Then go ahead and play with the source, every time you save, the code will be tested.

\###Documentation If you want to generate documentation, you can run `grunt serve` which will generate a documentation on source first save. This means you just open any source file and save once. The documentation will be generated. Any subsequent save will trigger the documentation generation, which means it will always be latest(maybe slight delay).

\##Hall of fame So much for the title, it really is just the section to list all the people which have contributed to the project one way or another. So if you want your name to be here, you can start contributing to the project in any number of ways like refactoring, documentation, spell check, heck you can even ask me to put your name here.

\##Developer

- [Endy Jasmi](mailto:endyjasmi@gmail.com) (Me)

\##License This library is licensed under MIT as shown below. Exact same copy of the license can be found in `LICENSE` file.

```
The MIT License (MIT)

Copyright (c) 2014 Endy Jasmi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

```

This is my first open source library. Be kind to me &gt;.&lt;

\##Feedback Say hello to me or ask me any question at .

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~11 days

Total

11

Last Release

4233d ago

Major Versions

1.2.2 → 2.0.02014-10-31

2.1.1 → 3.0.02014-12-01

PHP version history (2 changes)1.1.0PHP &gt;= 5.3

2.0.0PHP &gt;= 5.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1048745?v=4)[Endy Jasmi](/maintainers/endyjasmi)[@endyjasmi](https://github.com/endyjasmi)

---

Top Contributors

[![endyjasmi](https://avatars.githubusercontent.com/u/1048745?v=4)](https://github.com/endyjasmi "endyjasmi (134 commits)")

---

Tags

laraveldatabaseneo4jcypher

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/endyjasmi-neo4j/health.svg)

```
[![Health](https://phpackages.com/badges/endyjasmi-neo4j/health.svg)](https://phpackages.com/packages/endyjasmi-neo4j)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M96](/packages/mongodb-laravel-mongodb)[illuminate/database

The Illuminate Database package.

2.8k54.9M11.6k](/packages/illuminate-database)[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[illuminate/view

The Illuminate View package.

13047.0M2.2k](/packages/illuminate-view)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
