I'm trying to make an update
to my app but getting a Status Code:405 Method Not Allowed
header
Here's my backbone.js code
UserModel = Backbone.Model.extend({
url:'/user'
,initialize:function(attributes,options){
this.fetch()
this.set('isEmail',true)
this.sync('update',this,{
success:function(){
console.log('sync',arguments)
}
})
}
})
The relevant parts of my routes.php file
Route::resource('user','UserController');
I do have a UserContoller set up with an update method
public function update(){
return 'x';
}