错误:CON laravel恩axios.put“请求,状态码500失败”()

问题描述 投票:1回答:1

我学习在这种情况下,5.6版与laravel工作,通过实现与爱可信代码到我的网页更新表,我得到以下信息enter image description here我有问题的代码是下一个

actualizarCategoria(){
               if (this.validarCategoria()){
                    return;
                }
                
                let me = this;

                axios.put('/categoria/actualizar',{
                    'nombre': this.nombre,
                    'descripcion': this.descripcion,
                    'id': this.categoria_id
                }).then(function (response) {
                    me.cerrarModal();
                    me.listarCategoria();
                }).catch(function (error) {
                    console.log(error);
                }); 
            }
javascript php laravel axios laravel-5.6
1个回答
0
投票

我要说的是,错误500 =错误形成服务器。所以,你的要求可能会格式不正确或您的API(laravel侧)的错误。检查你的PHP的日志,你应该看到一个错误,并期待在镀铬网络标签可以看到来自服务器的响应

© www.soinside.com 2019 - 2024. All rights reserved.