dimanche 15 novembre 2020

how to take data in chunk and pass it view in laravel

I am using query which is taking data from database but it is taking too long becuase i am using doesthave() method with this query which is checking whole table .

Here is the query

   $consignments = Consignment::where('customer_id', $invoice->customer_id)->doesnthave('invoice_charges')->get();

So now I am thinking I should take records from database in chunk . How I can do it

What I want is in the End $consignments variable should have all the consignments data as it is taking from database directly



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire