Closed sreesshylam closed 7 years ago
remove a single relation from group of relation
@sreesshylam can you give a code example of what you wish to achieve please.
$ads = Ads::find(123); $tag =$ads->tags()->get(); //get all tags relates to ads
how to remove the relation from the 'Taged' from the ads
i use this code but the tags removed form the corresponding node
foreach ($tag as $key => $value) {
$value->delete();
}
i need only relation removed from Ads
foreach ($ads->tags()->edges() as $relation) { $relation->delete(); }
i have also one dbt how to convert cypher query (MATCH p=(Ads)-[r:TAGS]->(Tags)<-[r1:INTERESTED]-(User) RETURN p) to corresponding NeoEloquent
@sreesshylam You can also use raw cypher for more complicated query's. Create a stored procedures class and give it a try.
Take a look here: https://github.com/Vinelab/NeoEloquent#working-with-edges