I'm having trouble to get my controller to listen to DELETE requests. When I send a DELETE request to /api/players/1 I get a NotFoundHttpException. Here's my routes.php
Route::group(array('prefix' => 'api'), function() {
Route::controller('matches', 'MatchController');
Route::controller('players', 'PlayerController');
Route::controller('auth', 'AuthController');
});
My PlayerController
class PlayerController extends BaseController {
public function getIndex() {
// do something... this works
}
public function postIndex() {
// do something... this works
}
public function deleteIndex() {
// works when I send a DELETE request to /api/players
}
public function delete($id = null) {
// doesn't work!
}
}
I guess I'm missing some kind of secret word or something... I just don't know how to catch a DELETE request with an id. What am I doing wrong?