Sortable by morph-relation
Hi folks,
I'm trying to make a column sortable, which is beeing referenced by a morph-relation.
I tried using
I'm trying to make a column sortable, which is beeing referenced by a morph-relation.
I tried using
->sortable(query: fn($query, $direction) => $query->orderBy('relationame.relationproperty', $direction)) and made sure that all possible morphs got said relationproperty, but to no avail. Laravel tells me Unknown column 'relationname.relationproperty' in 'order clause' and the SQL only seems to use the basemodel and not the relationmodel. Am I missing something here?