lundi 2 novembre 2020

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

Aucun commentaire:

Enregistrer un commentaire