samedi 8 septembre 2018

missing required parameters for route ajax post

I have used resource controller with the following route:

 Route::resource('invoice','InvoiceController');

Here is the ajax request but the problem is defining route in ajax and that's why geting following Error:

missing required parameters for route

Ajax request:

  <a href="" class="btn btn-danger m-btn m-btn--icon m-btn--icon-only" data-id=""> <i class="fa fa-times"></i> </a>

 function() {

      $.ajaxSetup({
          headers: {
              'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
              }
      });
        $.ajax({
            type: "POST",
            url: "",
            data: {id:id},
            success: function (data) {
                          //
                }         
        });
});



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2NZVDmg
via IFTTT

Aucun commentaire:

Enregistrer un commentaire