laravel/laravel — pull request #124 by sparksp (2011-10-23 22:18:32+00:00)
Title: Routed 'provides' should be a separate argument

When using 'provides' I would expect another callback argument to be populated with the extension however it is currently included in the last argument (or not at all). Here's some routes that will now be possible including parameters received before and after applying this patch...

```php
array('provides' => 'json', 'do' => function($ext = '')
{
// GET /users.json
before('')
after('json')
}),

'GET /users/(:num)' => array('provides' => 'json', 'do' => function($id, $ext = '')
{
// GET /users/123.json
before('123.json', '')
after(123, 'json')
}),

'GET /users/(:num).json' => function($id)
{
// GET /users/123.json
before('123.json')
after(123)
},

'GET /users/(:num).(json|xml)' => function($id, $ext)
{
// GET /users/123.json
before() // Exception! Missing argument 2 for {closure}()
after(123, 'json')
},
);
```