Closed viandwi24 closed 2 years ago
Hey @viandwi24,
This is not currently possible but it could be possible to achieve this using eager loading but i don't have the time to implement this. I would suggest using the query builder or if anyone else wants to add this functionality i am open to PRs.
Previously it was resolved in the has one relation, has many, but the order did not work by directly writing it in {'column': 'admin.name'}, and there is no method for the relations of morp one? I've seen the documentation only contain hasOne, hasMany, and belongsToMany. Are there other ways to order columns directly? Is it not possible to use with (eager loading)? as :
$ column = 'account.name'; $ data = Users :: with ('account') -> eloquentQuery ($ column, $ dir, $ search) -> paginate ($ length); // and the account is a morphOne relation
thanks.