orderLogic #449
-
Hi, I have a question: order product in list I want to show all product sell and customer that buyed i make: why? thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
To customize the order logic for a column in Backpack, you can use the "orderLogic" method as described in our documentation. By adding the "orderLogic" method to your column, you can set the orderBy clause of the query as per your requirements. For example, if you want to order the results of your query in descending order based on a column called "created_at", you can add the following code to your column:
In this code, the "orderLogic" method is added to the "created_at" column. The method takes three parameters: the query object, the column name, and the direction of the sort. In this case, the method sets the orderBy clause of the query to sort the results in descending order based on the "created_at" column. Please let us know if you need any further assistance. |
Beta Was this translation helpful? Give feedback.
-
thanks but if i do: how can i do? |
Beta Was this translation helpful? Give feedback.
-
I'm closing this issue due to inactivity. If you need further assistance or have additional questions, feel free to reopen this issue or create a new one. We're here to help! |
Beta Was this translation helpful? Give feedback.
Hi @soluzione-software,
To customize the order logic for a column in Backpack, you can use the "orderLogic" method as described in our documentation.
By adding the "orderLogic" method to your column, you can set the orderBy clause of the query as per your requirements. For example, if you want to order the results of your query in descending order based on a column called "created_at", you can add the following code to your column:
In this code, the "orderLogic" method is ad…