Skip to content

Instantly share code, notes, and snippets.

@trq
Created June 18, 2014 14:01
Show Gist options
  • Save trq/12892ef63d4c5c06da75 to your computer and use it in GitHub Desktop.
Save trq/12892ef63d4c5c06da75 to your computer and use it in GitHub Desktop.
<?php
public function registerEngineResolver()
{
$this->app->bindShared('view.engine.resolver', function($app)
{
$resolver = new EngineResolver;
// Next we will register the various engines with the resolver so that the
// environment can resolve the engines it needs for various views based
// on the extension of view files. We call a method for each engines.
foreach (array('php', 'blade') as $engine)
{
$this->{'register'.ucfirst($engine).'Engine'}($resolver);
}
$resolver->register('phtml', function() { return new PhpEngine; });
return $resolver;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment