Vinelab / NeoEloquent

The Neo4j OGM for Laravel
MIT License
633 stars 197 forks source link

Unable to create node [500]: Headers: Array ( ) Body: Array ( [error] => [0] ) #268

Closed oozone closed 3 years ago

oozone commented 6 years ago

Just got started working on this and I get this error which I can't seem to solve: Setup: Laravel in laradock containers, neo4j container, connection is good Unable to create node [500]: Headers: Array ( ) Body: Array ( [error] => [0] )

The model itself

use Vinelab\NeoEloquent\Eloquent\Model as NeoEloquent;

class User extends NeoEloquent  //extends Authenticatable
{

    protected $connection = 'neo4j';
    //use Notifiable;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name', 'email', 'password',
    ];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token',
    ];
}

And in my controller I just want to create a User node

$user = User::create(['name' => 'Some Name', 'email' => 'some@email.com']);

Could someone enlighten me what I'm doing wrong? Thanks

oozone commented 6 years ago

This was a problem with my DB connections variables to Neo4J not being declared in my .env file. This can be closed.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.