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

188
Views
cómo usar enlaces que devuelven paginar a la respuesta JSON en AJAX LARAVEL

¿Cómo puedo usar o llamar a $data->links() para la paginación? En mi escenario, estoy usando get request usando AJAX JavaScript. Devuelve una respuesta JSON y quiero llamar a $data->links() usando JavaScript.

este es mi controlador

 public function getOrders($store_id) { $data = DB::table('stores') ->where('stores.id',$store_id) ->paginate(5); return response()->json(['data' => $data]); }

Esta es mi solicitud de obtención de AJAX

 function fetchOrder(){ $.ajax({ type: "GET", url: "/get-orders/"+store_id, dataType: "json", success: function (response) { if (response.data.data != null) { console.log(response); $('.OrderTbody').html(""); $.each(response.data.data, function (key, item) { $('.OrderTbody').append('<tr><td>' + item.store_name + '</td></tr>'); }); } } }); }
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!