laravel/framework — pull request #4078 by philsturgeon (2014-04-08 17:38:19+00:00)
Title: [Feature] Auto HTTP OPTIONS response

If the OPTIONS verb is not implemented manually through the router (quite likely) then Laravel should respond with the routes that are available. It does this by looking at the action list and listing a unique set of verbs.

Now, two things.

1.) This might not be the fastest approach, but I did not want to add a huge amount of pre-population of new arrays just for this feature, as that would muddy what is actually happening somewhat.

2.) Obviously `exit;` is a bad idea. I have no idea how to bubble this header back up from the method in which I have set it, to somewhere where the actual response is available. @taylorotwell hopefully you can gimme some advice on that?

Everything else works as expected. :)