Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Neo4j
  3. NeoEloquent

NeoEloquent

MITPHPv1.8.2

A Neo4j Object Graph Mapper (OGM) driver for Laravel, enabling Eloquent-style models and relationships with a graph database.

GitHubGitHub
656 stars193 forks0 contributors

What is NeoEloquent?

NeoEloquent is an Eloquent driver for Laravel that integrates Neo4j as a graph database backend. It allows developers to use Laravel's Eloquent ORM syntax to interact with Neo4j, making it easier to build applications that leverage graph data structures. The project bridges the gap between Laravel's elegant ORM and the power of graph databases, enabling developers to think in graphs while writing familiar Eloquent code.

Target Audience

Laravel developers who need to work with graph data structures and want to use Neo4j as their database backend while maintaining the Eloquent ORM syntax they are accustomed to.

Value Proposition

Developers choose NeoEloquent because it provides a seamless integration of Neo4j into Laravel, allowing them to use Eloquent models, relationships, and migrations with a graph database. Its unique selling point is the ability to treat graph relationships as first-class entities with directional edges and attributes, alongside advanced Neo4j-specific features like the CreateWith method for efficient graph construction.

Overview

The Neo4j OGM for Laravel

Use Cases

Best For

  • Building Laravel applications that require complex relationship modeling with graph databases.
  • Migrating from SQL-based Laravel applications to Neo4j while preserving Eloquent syntax.
  • Implementing polymorphic relationships in Laravel using Neo4j's hyperedge capabilities.
  • Performing advanced graph queries in Laravel, such as percentile and standard deviation aggregates.
  • Managing graph migrations and schema in Laravel with Neo4j label indexing and constraints.
  • Creating and managing edges with attributes in Laravel applications using Neo4j.

Not Ideal For

  • Applications heavily reliant on SQL joins or pivot tables, which NeoEloquent explicitly does not support.
  • Projects with simple, tabular data structures where a relational database would suffice, as Neo4j adds unnecessary complexity.
  • Teams not using Laravel or preferring other ORMs, since NeoEloquent is tightly coupled with Laravel's Eloquent ecosystem.
  • Data models requiring nested arrays or objects, due to Neo4j's limitations on property storage as noted in the 'Avoid' section.

Pros & Cons

Pros

Seamless Eloquent Integration

Allows developers to use familiar Laravel Eloquent syntax with Neo4j, including models, relationships, and query builders, as demonstrated in the Models and Relationships sections.

Advanced Graph Features

Supports graph-specific operations like directional edges, edge attributes, and Neo4j aggregates such as percentile and standard deviation, detailed in the Edges and Aggregates sections.

Efficient Graph Construction

The CreateWith method enables creating multiple related nodes and edges in a single Cypher query for performance, explained in the 'Only in Neo' section with examples.

Migration and Schema Support

Provides Laravel-style migrations and schema management for Neo4j, including indexing and constraints via commands like neo4j:migrate, covered in the Migration and Schema sections.

Cons

Missing SQL Conventions

Does not support SQL joins or pivot tables, which can hinder migration from relational databases and limit functionality for complex relational queries, as warned in the 'Avoid' section.

Complex Setup Requirements

Requires manual configuration steps like modifying composer.json, creating a labels folder, and setting up connections, adding overhead compared to standard Eloquent, as seen in Installation and Configuration.

Data Structure Limitations

Prohibits nested arrays and objects in models due to Neo4j's property storage constraints, forcing data flattening or alternative approaches, noted in the 'Avoid' section.

Vendor and Framework Lock-in

Tightly coupled with Laravel and requires a running Neo4j instance, leading to dependency on specific technologies and potential compatibility issues with other tools or databases.

Frequently Asked Questions

Quick Stats

Stars656
Forks193
Contributors0
Open Issues13
Last commit1 year ago
CreatedSince 2014

Tags

#database-driver#eloquent#orm#laravel#ogm#migrations#php#graph-database#relationships#neo4j

Built With

C
Composer
P
PHP
L
Laravel
N
Neo4j

Included in

Neo4j554
Auto-fetched 5 hours ago

Related Projects

neo4jphpneo4jphp

PHP wrapper of the Neo4j REST interface

Stars535
Forks135
Last commit8 years ago
neo4j-php-clientneo4j-php-client

PHP Client for Neo4j with Enterprise Support

Stars285
Forks93
Last commit4 years ago
Neo4j-PHP-OGMNeo4j-PHP-OGM

Neo4j Object Graph Mapper for PHP

Stars153
Forks54
Last commit4 years ago
SpiderSpider

Simple, flexible graph database abstraction for php

Stars21
Forks4
Last commit8 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub