Skip to content

Commit bce594c

Browse files
author
Christopher Scott
committed
Fixed Blade facade being called within the namespace
Removed calls to facade from DbBladeCompiler.php by passing in app instance from provider.
1 parent ee2c203 commit bce594c

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

Diff for: src/Flynsarmy/DbBladeCompiler/DbBladeCompiler.php

100755100644
+10-7
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,18 @@ class DbBladeCompiler extends BladeCompiler implements CompilerInterface
99
/** @var \Illuminate\Config\Repository */
1010
protected $config;
1111

12-
public function __construct($filesystem, $cache_path, $config)
13-
{
12+
public function __construct($filesystem, $cache_path, $config, $app)
13+
{
14+
// Get Current Blade Instance
15+
$blade = $app->make('blade.compiler');
16+
1417
parent::__construct($filesystem, $cache_path);
15-
$this->rawTags = Blade::getRawTags();
16-
$this->contentTags = Blade::getContentTags();
17-
$this->escapedTags = Blade::getEscapedContentTags();
18-
$this->extensions = Blade::getExtensions();
18+
$this->rawTags = $blade->getRawTags();
19+
$this->contentTags = $blade->getContentTags();
20+
$this->escapedTags = $blade->getEscapedContentTags();
21+
$this->extensions = $blade->getExtensions();
1922
$this->config = $config;
20-
}
23+
}
2124

2225
/**
2326
* Compile the view at the given path.

Diff for: src/Flynsarmy/DbBladeCompiler/DbBladeCompilerServiceProvider.php

100755100644
+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function register()
4141
$cache_path = storage_path('app/db-blade-compiler/views');
4242

4343
$db_view = new DbView($app['config']);
44-
$compiler = new DbBladeCompiler($app['files'], $cache_path, $app['config']);
44+
$compiler = new DbBladeCompiler($app['files'], $cache_path, $app['config'], $app);
4545
$db_view->setEngine(new CompilerEngine($compiler));
4646

4747
return $db_view;

0 commit comments

Comments
 (0)