4.10.2
Fixed
- Sorting using BelongsTo field type. So now you can have:
// PostRepository
public static function sorts(): array
{
return [
'users.attributes.name' => SortableFilter::make()->setColumn('users.name')->usingBelongsTo(
BelongsTo::make('user', 'user', UserRepository::class),
)
];
}
And frontend can filter your posts by users.name using:
api/restify/posts?sort=users.attributes.name.