0

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');
Santi Barbat
  • 2,097
  • 2
  • 21
  • 26

1 Answers1

2

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.

ceejayoz
  • 176,543
  • 40
  • 303
  • 368