laravel/framework — pull request #509 by bencorlett (2013-03-05 21:47:38+00:00)
Title: Making the view finder / environment not greedy. Fixes #506.

As mentioned in #506, if you register your own custom view compiler, e.g. for `mustache.php` files, they will never be loaded, as the `php` "compiler" matches first. I have made the view environment prepend new extensions rather than append them, so any custom registered compilers are used first.

I know there can be better ways (e.g. through the `IoC` container, but purely for example), this could also easily let you override the blade compiler (as an example) by registering a new engine for `blade.php`.

Just a simple little fix. Enjoy.

Signed-off-by: Ben Corlett