Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

366
Views
Cargando una lista de datos masivos en DataTable usando laravel

Estoy tratando de enumerar datos masivos (millones) en DataTable, lleva mucho tiempo reflejar la página de visualización.

ver JS

 $.ajax({ type:'POST', url: '/admin/secure/viewsupplier', headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, dataType: 'JSON', processData: false, contentType: false, success: function(response){ var supplierTable = $('#supplier_table').DataTable({ data: response, columns: [ {'data':'name'}, {'data':'email'}, {'data':'phone'}, {'data':'status'}, ] }); }, });

Controlador

 public function viewsupplierRequest $request){ $suppliers = DB::table('suppliers')->select('*')->cursor(); return response()->json($suppliers); }

Base de datos - PgSql

Esto devolverá 1 millón de datos de proveedores para la lista

He intentado obtener el método también

 $suppliers = DB::table('suppliers')->get();

Espada

 <table> <thead id="supplier_table"> <tr> <th>Name</th> <th>Email</th> <th>Phone</th> <th>Status</th> </tr> </thead> </table>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!