But it throws an error because of /vendor/bkwld/decoy/classes/Input/Position.php:30 - 'getOtherKey' ... this method was moved onto the Pivot Object in Laravel 5.4.
Did a quick fix by requesting the first child and taking the otherKeyfrom its pivot.. $this->pivot = $relation->where($relation->first()->pivot->getOtherKey(), '=', request('parent_id'))->first()->pivot;
At this point we should always have one related item so this works for me :P
..
Actually i'm not sure if you're supporting Laravel 5.4 officially. But other than this issue everything runs perfect :)
Hello!
I tried to add sorting of a ManyToMany Relationship (like http://docs.decoy.bukwild.com/models#relationships)
But it throws an error because of
/vendor/bkwld/decoy/classes/Input/Position.php:30
- 'getOtherKey' ... this method was moved onto the Pivot Object in Laravel 5.4.Did a quick fix by requesting the first child and taking the
otherKey
from its pivot..$this->pivot = $relation->where($relation->first()->pivot->getOtherKey(), '=', request('parent_id'))->first()->pivot;
At this point we should always have one related item so this works for me :P
..
Actually i'm not sure if you're supporting Laravel 5.4 officially. But other than this issue everything runs perfect :)