Laravel | newQuery inside dataTables returning 10 results only from many within the database

Not sure what's wrong here. In my App/dataTables I have something with this method :

public function query(ProductOrder $model)
{
return $model->newQuery()->with("product")
->where('product_orders.order_id', $this->id)
->select('product_orders.*')->orderBy('product_orders.id', 'desc');
}

As you can see i'm pulling things from the product_orders table where product_orders.order_id = the value i pass. There are more than 10 results always within the database, but the result returned is always limited to 10. Can someone please help to understand why ? Does newQuery has any such automatic limit on the number of rows fetched ?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3jMBteR
via IFTTT

تعليقات

المشاركات الشائعة من هذه المدونة

I am unable to figure out how to create payment collection request, after a form has been submitted in laravel

laravel, mysql transaction not working after failed one time