laravel/laravel — pull request #1047 by Kindari (2012-08-02 22:55:56+00:00)
Title: Allow View file extensions to be dynamicly configured

Doing this would make integrating additional parsers into laravel extremely easy, take this as a simple example:

define('MD_EXT', '.md');
View::$extensions[] = MD_EXT;
Event::listen(View::engine, function($view)
{
if ( ! str_contains($view->path, MD_EXT))
{
return;
}
dd('YAY markdown! ' . $view->path);
});

Route::get('/', function()
{
return View::make('home.test'); // would load a file named home/test.md
});

Signed-off-by: William Cahill-Manley