dousong5492 2016-07-07 12:32 采纳率: 100%
浏览 95

Laravel 5.1 ajax简单URL路由显示未找到错误(404)

<script type="text/javascript">
             function variants(master_id)
             {

              $.ajax({
                type: "GET",
                url: "getVariants"+'/'+master_id,
                success: function(){

              }
             });

             }
    </script>

This is the script that I have defined and kept is as simple as possible.

The route is this and it still shows me 404 not found error.

Route::get('getVariants/{master_id}','Retailer\ProductController@getVariants');
  • 写回答

4条回答 默认 最新

  • douyinlai2169 2016-07-07 12:36
    关注

    Add full url path http://example.com/getVariants/master_id to ajax call

    评论

报告相同问题?

悬赏问题

  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64