mardi 3 décembre 2019

Error Missing required parameters for [Route: city] [URI: daftar/city/{id}]

I want to send data to the controller with ajax, but there is an error

Missing required parameters for `[Route: city] [URI: daftar / city / {id}].

here's my ajax code

 $(".province").on("change",function(){
      var id = this.value;
      console.log(id);
      $.ajax({
        type: "get",
        url: ""+'/'+id  ,
        dataType: "json",
        success: function(data){
            console.log('');
        },
        });
});

and this my route

Route::group(['prefix' => 'vendor'], function () {
 Route::get('/city/{id}', 'Vendor\VendorController@getCity')->name('city');
});


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire