Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update HandlebarsServiceProvider.php #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions src/HandlebarsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,34 +45,12 @@ protected function registerConfig()
protected function registerEngineResolverExtensions()
{
$this->app->extend('view.engine.resolver', function ($resolver, $app) {
$this->registerBladeEngine($resolver);

$this->registerHandlebarsEngine($resolver);

return $resolver;
});
}

/**
* Register the Blade engine implementation.
*
* @param \Illuminate\View\Engines\EngineResolver $resolver
* @return void
*/
public function registerBladeEngine($resolver)
{
$app = $this->app;

// The Compiler engine requires an instance of the CompilerInterface, which in
// this case will be the Blade compiler, so we'll first create the compiler
// instance to pass into the engine so it can compile the views properly.
$app->singleton('blade.compiler', function ($app) {
$cache = $app['config']['view.compiled'];

return new BladeCompiler($app['files'], $cache);
});
}

/**
* Register the mustache engine implementation.
*
Expand Down