NeoEloquent. Include the package to your composer.json and run composer improvement

NeoEloquent. Include the package to your composer.json and run composer improvement

An Eloquent Neo4j Graph Driver

Installation

Include the ongoing company in app/config/app.php :

The company shall register all the necessary classes with this package and also will alias the Model course to NeoEloquent in order to just expand NeoEloquent in your models.

Setup

in app/config/database.php or perhaps in situation of an configuration that is environment-based.php make neo4j your default connection:

Add the text defaults:

Documentation

Models

As easy as it’s, NeoEloquent will create the standard node label through the course title, in this instance it’s going to be :User . Learn about node labels right here

Namespaced Models

By using namespaces along with your models the label will look at the namespace that is full.

The generated label from that relationship will likely be VinelabCmsAdmin , this really is essential to make sure labels usually do not clash in instances where we introduce another Admin example like Vinelab\Blog\Admin then points gets messy with :Admin into the database.

Custom Node Labels

You might specify the label(s) you want to be utilized rather than the default created, also, they are instance sensitive and painful so they really will undoubtedly be kept as put right here.

NeoEloquent has a fallback help when it comes to $table adjustable BirminghamAL escort which is used if discovered and there clearly was no $label defined from the model. Continue reading “NeoEloquent. Include the package to your composer.json and run composer improvement”