Download the PHP package dwoodard/neo4j-eloquent without Composer
On this page you can find all versions of the php package dwoodard/neo4j-eloquent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dwoodard/neo4j-eloquent
More information about dwoodard/neo4j-eloquent
Files in dwoodard/neo4j-eloquent
Package neo4j-eloquent
Short Description Eloquent-style API for Neo4j graph database interactions with schema-less, dynamic operations
License MIT
Homepage https://github.com/dwoodard/neo4j-eloquent
Informations about the package neo4j-eloquent
Neo4j Eloquent
A Laravel package that provides an Eloquent-style API for Neo4j graph database interactions with schema-less, dynamic operations.
Features
✅ Schema-less Operations - No predefined models required
✅ Eloquent-style API - Familiar Laravel query patterns
✅ Multi-label Support - Handle nodes with multiple labels
✅ Relationship Traversal - Fluent relationship navigation
✅ Laravel Integration - Seamless service provider integration
✅ Model-based Approach - Traditional Eloquent-style models
✅ JSON Serialization - Proper JSON encoding out of the box
✅ Auto Service Injection - No manual configuration required
Installation
Install the package via Composer:
Publish the configuration file:
Configuration
Add your Neo4j connection details to your .env
file:
That's it! The package will automatically configure itself and inject the Neo4j service.
Usage
Model-based Approach (Recommended)
Create a model by extending the base Model
class:
Now you can use familiar Eloquent methods:
Schema-less Operations
Create any type of node without predefined models:
Relationship Traversal
JSON Serialization
All Node and Model instances automatically serialize to JSON properly:
Raw Cypher Queries
Testing Connection
Test your Neo4j connection:
Advanced Features
Multi-Label Operations
Complex Queries
Configuration Options
The package configuration file (config/neo4j.php
) supports:
- Multiple connection configurations
- Query logging for debugging
- Auto UUID generation
- Custom field mappings
Requirements
- PHP 8.2+
- Laravel 10.0+
- Neo4j 4.0+ database
What's Fixed in This Version
This package includes several important fixes:
- Automatic Service Injection - No need to manually set up the Neo4j service
- Proper JSON Serialization - Node objects serialize correctly in API responses
- Eloquent-style Methods -
all()
,find()
,create()
work out of the box - Model Base Class - Easier model creation with fillable attributes and casts
- Type Safety - Proper type declarations throughout
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This package is open-sourced software licensed under the MIT license.
Support
All versions of neo4j-eloquent with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
laudis/neo4j-php-client Version ^3.0