I have a holding(inventory) field in my product table,
I want to get products first that have holding > 0 and on last the products with holding <= 0.
$products = Product::orderBy('holding' , 'desc')->orderBy('id' , 'desc')->paginate(27);
the above query has problem that sorting by 'holding' number, I want to sorting by id, and the product with holding <= 0 goes to last page of pagination.
thanks