How can i display my store order based on the ‘marketplace_orders’ table custome field

Laraship QuestionsCategory: TechnicalHow can i display my store order based on the ‘marketplace_orders’ table custome field
SANDEEP AGGARWAL asked 3 years ago
Hello laraship team, we need to display store order info based on the marketplace_orders  table Custom field. If  custom field value  0 (zero)  mean hide row value and if 1 means need to display the order value for seller. How i  put where condition (WHERE  status == 1) to check status of custom field here. return user()->storeOrders()->select('marketplace_orders.*')->newQuery(); Let me know any way..... Thank you      
2 Answers
laraship Staff answered 3 years ago
Hello, For performance reasons, we suggest you using a field under the orders table and it will make it more efficient to query, or you can store it under the properties column and use a json query 
laraship Staff answered 3 years ago
Hello, If you want to add a condition at table query you can add the where to the query in the query function for example return user()->storeOrders()->where('order_status','your-status')->select(‘marketplace_orders.*’)->newQuery();