Open
Description
Search::add(Customer::withCount('orders')->select('id', 'first_name', 'last_name', 'email', 'orders_count'), ['first_name', 'last_name'], 'first_name')
->add(Order::orderListSelectColumns(), ['order_number'], 'order_date')
->endWithWildcard()
->includeModelType()
->orderByDesc()
->paginate(25)
->search($searchValue);
Want to achieve with customer order count and select specific columns for customers' table?
But the count not coming orders_count
not found error returning
Column not found: 1054 Unknown column 'orders_count' in 'field list'
Metadata
Metadata
Assignees
Labels
No labels