PHPackages                             giudicelli/neo4j-php-ogm - 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. giudicelli/neo4j-php-ogm

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

giudicelli/neo4j-php-ogm
========================

The Neo4j PHP OGM

0.1.0(5y ago)0711MITPHPPHP ^7.4

Since Apr 15Pushed 5y ago2 watchersCompare

[ Source](https://github.com/giudicelli/neo4j-php-ogm)[ Packagist](https://packagist.org/packages/giudicelli/neo4j-php-ogm)[ Docs](https://github.com/giudicelli/neo4j-php-ogm)[ RSS](/packages/giudicelli-neo4j-php-ogm/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (4)Versions (2)Used By (1)

[![Tests](https://github.com/giudicelli/neo4j-php-ogm/actions/workflows/tests.yml/badge.svg)](https://github.com/giudicelli/neo4j-php-ogm/actions/workflows/tests.yml)

Neo4j PHP OGM
=============

[](#neo4j-php-ogm)

This a complete redevelopment of a Neo4j PHP OGM. It was inspired by [GraphAware Neo4j PHP OGM](https://github.com/graphaware/neo4j-php-ogm), although it doesn't support nearly as many features as Graphaware's OGM does. Redeveloping a full Doctrine compatible OGM would be too much work. But as features are added it will come close to it.

A few features from Doctrine are being used, such as parsing and caching annotations.

It uses [Laudis Neo4j PHP Client](https://github.com/neo4j-php/neo4j-php-client) which is the only PHP client [recommended by Neo4j](https://neo4j.com/developer/php/).

This bundle supports lazy loading for entities and collections.

Table of Contents
=================

[](#table-of-contents)

1. [Installation](#Installation)
2. [Example](#Example)
3. [Documentation](#Documentation)
    1. [Model](#Model)
    2. [Annotations](#Annotations)
        1. [@OGM/Entity](#OgmEntity)
        2. [@OGM/Relationship](#OgmRelationship)
        3. [@OGM/Id](#OgmId)
        4. [@OGM/StartEntity](#OgmStartEntity)
        5. [@OGM/EndEntity](#OgmEndEntity)
        6. [@OGM/Property](#OgmProperty)
        7. [@OGM/Convert](#OgmConvert)
        8. [@OGM/QueryResult](#OgmQueryResult)
        9. [@OGM/Relation](#OgmRelation)
    3. [Repository](#Repository)
    4. [Events](#Events)
        1. [NodeCreatedEvent](#NodeCreatedEvent)
        2. [NodeUpdatedEvent](#NodeUpdatedEvent)
        3. [NodeDeletedEvent](#NodeDeletedEvent)
        4. [NodeLoadedEvent](#NodeLoadedEvent)
4. [FAQ](#FAQ)
    1. [How do I query a node by its Neo4j id?](#how-do-i-query-a-node-by-its-neo4j-id)
    2. [Can I filter nodes by their relations?](#can-i-filter-nodes-by-their-relations)
    3. [Can I run custom queries?](#can-i-run-custom-queries)
    4. [Can I run custom queries and get hydrated objects ?](#can-i-run-custom-queries-and-get-hydrated-objects)
5. [License](#License)

Installation
============

[](#installation)

Install with composer

```
composer require giudicelli/neo4j-php-ogm

```

Example
=======

[](#example)

For more complete examples, please check the *examples* directory.

```
