robsontenorio/vue-api-query

orderBy to accept array of strings instead

Closed this issue ยท 2 comments

In the documents, it says:

await Model.orderBy('-created_at', 'category_id')

is it possible to somehow pass an array of strings as the args?

Hi @rancou! You can use the spread syntax:

await Model.orderBy(...myArray)

๐ŸŽ‰ This issue has been resolved in version 1.8.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€