etrepat / baum

Baum is an implementation of the Nested Set pattern for Laravel's Eloquent ORM.
http://etrepat.com/baum
MIT License
2.24k stars 459 forks source link

Eloquent ->get() does not work #215

Open michelkal opened 8 years ago

michelkal commented 8 years ago

Hello there! Using Laravel ->get() does not return any value and baum getDescendants() or other similar methods return Method does not exist, but when using Eloquent ->first() this baum methods work fine. Any idea on this?

dcanaud commented 8 years ago

getDescendants() already returns an eloquent collection, that's why you can call the first() function. Try to use descendants()->get(); Fyi they both get the same results.