dev-master
9999999-devBrings Neo4J PHP OGM to Laravel4
MIT
The Requires
- php >=5.3.0
- illuminate/support 4.0.x
by Levi Stanley
laravel php
Wallogit.com
2017 © Pedro Peláez
Brings Neo4J PHP OGM to Laravel4
Allows you to use Neo4j with Laravel4, (*1)
Add niterain\Neo4jPhpOgm as a requirement to composer.json:, (*2)
{
"require": {
"niterain/neo4j-php-ogm": "dev-master"
}
}
Update your packages with composer update or install with composer install., (*3)
Once Composer has installed or updated your packages you need to register Neo4jPhpOgm with Laravel. Open up app/config/app.php and find the providers key towards the bottom and add:, (*4)
'Niterain\Neo4jPhpOgm\Neo4jPhpOgmServiceProvider',
Since I like having my config files in one directory, this library checks to see if the settings are in the database.php file in the app/config directory as one of the connections under the 'neo4j' key, but if there isn't one defined, it looks in its local config.php file., (*5)
You add your entities in an Entity folder, from there everything feels much like Doctrine2., (*6)
$em = App::make('entityManager');
$user = $em->getRepository('Entity\\User');
$user->add(array('firstName' => 'levi', 'lastName' => 'stanley'));
$em->persist($user);
$em->flush();
Brings Neo4J PHP OGM to Laravel4
MIT
laravel php