Vinelab / NeoEloquent

The Neo4j OGM for Laravel
MIT License
634 stars 200 forks source link

Unable to run php artisan neo4j:migrate #162

Closed reshma-r-p closed 8 years ago

reshma-r-p commented 8 years ago

I am using two db in my application. When i run php artisan neo4j:migrate for first time it shows the error message "
[Symfony\Component\Debug\Exception\FatalThrowableError]
Type error: Argument 1 passed to Vinelab\NeoEloquent\Query\Builder::__construct() must be an instance of Vinelab\NeoEloquent\Connection, instance of Illuminate\Database\MySqlConnection given, called in /var/www/html/project/vendor/vinelab/neoeloquent/src/Vinelab/NeoEloquent /Eloquent/Model.php on line 75
" Then i added " protected $connection = 'neo4j'; " in /var/www/html/project/vendor/vinelab/neoeloquent/src/Vinelab/NeoEloquent /Eloquent/Model.php. After that when i run php artisan neo4j:migrate i got the error " [ErrorException]
Array to string conversion
" What should i do to solve this?

KinaneD commented 8 years ago

@reshma-r-p Which version of NeoEloquent and Laravel are you using? If L 5.2 please use NeoEloquent 1.3.1. Did you set your default database in the config/database.php to neo4j?

reshma-r-p commented 8 years ago

@KinaneD thanks for the reply. Ma problem solved. I am using mysql and neo4j. I use the command php artisan neo4j:migrate --database=neo4j and my problem solved

DenzehlDacs commented 6 years ago

Hi @reshma-r-p I know this post is very old but im new to using neo4j and on top of that im using mysql along side it. im having a hard time migrating my mysql migrations in laravel.How did you get about doing it?