POST 方法不运动

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

这是代码

 $.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            }
            });
       $.ajax({
                method: 'post',
                url: '{{url('/addtemplatedata')}}',
                dataType: 'json',
                data: {
                    // _token: token,
                    template: template,
                    college_page: college_page,
                },
                success: function(response) {}
});

在这里输入图片描述

这是路线

Route::post('/addtemplatedata',[CollegeTemplate::class,'addtemplatedata']);

This is the error

我希望我的发布方法开始工作

jquery ajax routes laravel-blade response
© www.soinside.com 2019 - 2024. All rights reserved.