22
33namespace Leaf ;
44
5- use Illuminate \Container \Container ;
65use Illuminate \Contracts \Container \Container as ContainerInterface ;
7- use Illuminate \Contracts \Foundation \Application ;
86use Illuminate \Contracts \View \Factory as FactoryContract ;
97use Illuminate \Contracts \View \View ;
108use Illuminate \Events \Dispatcher ;
1715class Blade implements FactoryContract
1816{
1917 /**
20- * @var Application
18+ * @var BladeContainer
2119 */
2220 protected $ container ;
2321
@@ -33,7 +31,7 @@ class Blade implements FactoryContract
3331
3432 public function __construct ($ viewPaths = null , string $ cachePath = null , ContainerInterface $ container = null )
3533 {
36- $ this ->container = $ container ?: new Container ;
34+ $ this ->container = $ container ?: new \ Leaf \ BladeContainer () ;
3735
3836 if ($ viewPaths != null && $ cachePath != null ) {
3937 $ this ->configure ($ viewPaths , $ cachePath );
@@ -54,8 +52,8 @@ public function configure($viewPaths, $cachePath)
5452
5553 /**
5654 * Render your blade template,
57- *
58- * A shorter version of the original `make` command.
55+ *
56+ * A shorter version of the original `make` command.
5957 * You can optionally pass data into the view as a second parameter
6058 */
6159 public function render (string $ view , array $ data = [], array $ mergeData = []): string
@@ -65,7 +63,7 @@ public function render(string $view, array $data = [], array $mergeData = []): s
6563
6664 /**
6765 * Render your blade template,
68- *
66+ *
6967 * You can optionally pass data into the view as a second parameter.
7068 * Don't forget to chain the `render` method
7169 */
@@ -147,10 +145,10 @@ protected function setupContainer(array $viewPaths, string $cachePath)
147145 }, true );
148146
149147 $ this ->container ->bindIf ('config ' , function () use ($ viewPaths , $ cachePath ) {
150- return [
148+ return new Config ( [
151149 'view.paths ' => $ viewPaths ,
152150 'view.compiled ' => $ cachePath ,
153- ];
151+ ]) ;
154152 }, true );
155153
156154 Facade::setFacadeApplication ($ this ->container );
0 commit comments