diff --git a/README.md b/README.md index 118d98de..29e48ff3 100644 --- a/README.md +++ b/README.md @@ -224,14 +224,6 @@ MERGE (account)<-[rel_user_account:ACCOUNT]-(user) RETURN rel_user_account; ``` -The Cypher performed by this statement will be as follows: - -``` -MATCH (phone:Phone) (phone)<-[:PHONE]-(user:User) -WHERE id(phone) = 1006 -RETURN user; -``` - ### One-To-Many ```php @@ -292,7 +284,7 @@ class User extends NeoEloquent { } ``` -This represents an `OUTGOING` relationship between a `:User` node and another `:User`. +This represents an `INCOMING` relationship between a `:User` node and another `:User`. ```php $jd = User::find(1012); @@ -310,7 +302,7 @@ Or using the `attach()` method: ```php $jd->followers()->attach($mc); // Or.. -$jd->followers()->attach(1); // 1 being the id of $mc ($mc->getKey()) +$jd->followers()->attach(1013); // 1013 being the id of $mc ($mc->getKey()) ``` The Cypher performed by this statement will be as follows: @@ -318,7 +310,7 @@ The Cypher performed by this statement will be as follows: ``` MATCH (user:`User`), (followers:`User`) WHERE id(user) = 1012 AND id(followers) = 1013 -CREATE (user)-[:FOLLOWS]->(followers) +CREATE (followers)-[:FOLLOWS]->(user) RETURN rel_follows; ``` @@ -354,7 +346,7 @@ RETURN rel_follows; ### Dynamic Properties ```php -class Phone extends Eloquent { +class Phone extends NeoEloquent { public function user() { @@ -554,7 +546,7 @@ class Comment extends NeoEloquent { ### Eager Loading ```php -class Book extends Eloquent { +class Book extends NeoEloquent { public function author() { @@ -663,7 +655,7 @@ $post = $edge->related(); #### HyperEdge This edge comes as a result of a [Polymorphic Relation](#polymorphic) representing an edge involving -tow other edges **left** and **right** that can be accessed through the `left()` and `right()` methods. +two other edges **left** and **right** that can be accessed through the `left()` and `right()` methods. This edge is treated a bit different than the others since it is not a direct relationship between two models which means it has no specific direction.