Giter Site home page Giter Site logo

pietheinstrengholt / laravel-neo4j-neoeloquent-demo Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 1.0 481 KB

Demo with Laravel 5 and NeoEloquent OGM utilizing Neo4j graph database

PHP 76.96% JavaScript 0.91% ApacheConf 0.51% HTML 21.63%
laravel neo4j-graph-database demo composer php database

laravel-neo4j-neoeloquent-demo's Introduction

Laravel Neo4j Neoeloquent Demo

Copyright (c) 2016 Piethein Strengholt, [email protected]

ABOUT

This is a demo website with Laravel 5 utilizing a Neo4j graph database with NeoEloquent OGM. Goal is to make a Proof of Concept to demonstrate Laravel can be used with a Neo4j graph database backend. It is written in PHP/Laravel + jQuery / HTML / CSS (Bootstrap).

REQUIREMENTS

  • PHP >= 5.5.9
  • OpenSSL PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension
  • Composer
  • Git
  • Neo4j database

INITIAL DEPLOYMENT

  • install Neo4j. I used a docker container for this: docker run -d --publish=7474:7474 --publish=7687:7687 --volume=$HOME/neo4j/data:/data neo4j:3.0
  • install composer: curl -sS https://getcomposer.org/installer | php — –filename=composer
  • ssh to the machine, go the www directory
  • clone the repository: git clone https://github.com/pietheinstrengholt/laravel-neo4j-neoeloquent-demo.git .
  • run composer install --no-dev --optimize-autoloader , use your github key when asked.
  • copy the .env.example to .env and configure with the correct database settings. If localhost doesn't work, try 127.0.0.1 instead.
  • change the following variables:
DB_CONNECTION=neo4j
DB_HOST=127.0.0.1
DB_PORT=7474
DB_USERNAME=neo4j
DB_PASSWORD=neo4j
  • run php artisan key:generate to generate an unique key. Add this key to the .env configuration file
  • deploy the database, use the following command: php artisan neo4j:migrate
  • run php artisan optimize
  • run php artisan cache:clear
  • run mkdir -p bootstrap/cache
  • run mkdir -p storage/framework/cache
  • run chmod -R 777 storage/
  • run composer dump-autoload
  • run php artisan up

TODO

  • Fix user registration (violation of primary key)
  • Extend a little bit more
  • Add some nice d3js visualisation

laravel-neo4j-neoeloquent-demo's People

Contributors

pietheinstrengholt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

xumng123

laravel-neo4j-neoeloquent-demo's Issues

Error when hit : composer install --no-dev --optimize-autoloader

PHP Fatal error: Declaration of Vinelab\NeoEloquent\Connection::select($query, $bindings = Array) must be compatible with Illuminate\Database\Connection::select($query, $bindings = Array, $useReadPdo = true) in D:\xampp\htdocs\laravel-neo4j-neoeloquent-demo-master\vendor\vinelab\neoeloquent\src\Vinelab\NeoEloquent\Connection.php on line 13

�[37;41m
�[39;49m
�[37;41m [Symfony\Component\Debug\Exception\FatalErrorException]
�[39;49m
�[37;41m Declaration of Vinelab\NeoEloquent\Connection::select($query, $bindings = Array) must be compatible with Illum
inate �[39;49m
�[37;41m \Database\Connection::select($query, $bindings = Array, $useReadPdo = true)
�[39;49m
�[37;41m
�[39;49m

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.