What does the request look like in your browser?
Jan 26, 2018
8
Level 1
Laravel 5.4 Error 405 Method Not Allowed Error
I have Laravel 5.4 and VueJs application. When I run it in Localhost it was worked but now. I host in a server it gives the error GET > 405 Method Not Allowed Error. But GET requests are work fine. But this function I'm not using GET request. I using POST. But I giving this error. I have Installed CORS also. What can I do?
This is my POST Request in VueJS
this.$http.post("api/sendbooking",this.booking)
.then(function (response){
console.log(response)
})
This is api.php
Route::post('/sendbooking',[
'uses' => 'BookingController@setBooking'
])
Level 10
chrome dev tools, open Network tab, make a request, click on that request in the Network tab and scroll down to Request Headers which will also have the body of the request
Please or to participate in this conversation.