laravelneo4jlaravel-5neoeloquent

Laravel 5 NeoEloquent findByProperty


Im integratting Neo4j and Laravel 5 with NeoEloquent. I cant get a node by a property, only by node id like the example:

User::find(1);

What I want:

User::findByName('Some Name');

Solution

  • The typical way to get Eloquent to do this is:

    User::whereName('Some Name')->first()
    

    You could add a static findByName function to your User model to do this as User::findByName if you like.