Created
June 18, 2014 14:01
-
-
Save trq/12892ef63d4c5c06da75 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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