laravel/laravel — pull request #1332 by weotch (2012-10-09 16:55:54+00:00)
Title: Making routing on index more flexible. So, for instance, PUT /news/15 works

With simple controller routing (`Route::controller('news')`), I found that this sort of route didn't work:

PUT /news/25

My controller looks like this:

```PHP
class News_Controller extends Base_Controller {
public $restful = true;
public function put_index($id) { }
}
```

This would 404 because laravel thinks the action is "25" rather than the desired "index". This change checks if the detected action method is an integrer and, if it is, it treats that int as the first parameter and changes the method to "index".

I was motivated to this for Backbone.js routing, since it prefers routes like this (like Rails) by default.