-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cant figure out how to get this package to work #4
Comments
Not sure if my comment is still relevant here. The key in the If that doesn't work you may need to provide more info. And yes, it works with BelongsTo fields. |
@RVxLab does not seem to work, I have a public static $sortRelations = [
'color' => 'colors.name', // doesn't sort by name, it sorts by color_id only
]; # generates invalid SQL
select * from `products` order by `colors`.`name` desc limit 26 offset 0 |
I have added to my resource:
When i click the column for my belongs to field the key inte url is set to 'dealer_id'.
This mean that that the array_key_exists in the foreach in applyOrderings will search for a column named 'delaer_id' while my array key in $sortRelations is set to 'dealer'.
I understand that i need to modify the index query and join the dealer table to my resource.
Do you have any idea about what im missing?
Is this suposed to work with belongsTo fields?
The text was updated successfully, but these errors were encountered: