【发布时间】:2018-07-06 11:00:51
【问题描述】:
我有 Laravel 5.4 和 VueJs 应用程序。当我在 Localhost 中运行它时,它可以工作,但是现在。我托管在服务器中,它给出了错误 GET > 405 Method Not Allowed 错误。但是 GET 请求工作正常。但是这个函数我没有使用 GET 请求。我使用 POST。但我给出了这个错误。我也安装了 CORS。我能做什么?
这是我在 VueJS 中的 POST 请求
this.$http.post("api/sendbooking",this.booking)
.then(function (response){
console.log(response)
})
这是 api.php
Route::post('/sendbooking',[
'uses' => 'BookingController@setBooking'
]);
【问题讨论】:
-
你检查你的文件权限了吗?
-
如何查看