Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

207
Vistas
using Ajax with Laravel give me status 500

i'm using ajax with laravel for the first time and i have an error, it gives me status 500 Internal Server Error back.. Im sending the token and everything seems to be ok, can you guys check and maybe see where the problem is :), thanks a lot.

Code:

    jQuery(document).ready(function () {
        jQuery('#ajaxSubmit').click(function (e) {
            e.preventDefault();
            $.ajaxSetup({
                headers: {
                    'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content')
                }
            });
            console.log(listvalues)

            jQuery.ajax({
                url: "{{ route('downloadSelectedCsv') }}",
                method: 'POST',
                data: {
                    ids: listvalues,
                },

            });
        });
    });

Route: (Web.php)

Route::post('/download/csv', [\App\Http\Controllers\UrlController::class, 'downloadSelected'])->middleware(['auth'])->name('downloadSelectedCsv');

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda