diff --git a/src/Illuminate/View/ViewServiceProvider.php b/src/Illuminate/View/ViewServiceProvider.php index c40c3b9fc5bb..bfdc27ac7e41 100755 --- a/src/Illuminate/View/ViewServiceProvider.php +++ b/src/Illuminate/View/ViewServiceProvider.php @@ -135,7 +135,7 @@ public function registerEngineResolver() public function registerFileEngine($resolver) { $resolver->register('file', function () { - return new FileEngine($this->app['files']); + return new FileEngine(app()->make('files')); }); } @@ -148,7 +148,7 @@ public function registerFileEngine($resolver) public function registerPhpEngine($resolver) { $resolver->register('php', function () { - return new PhpEngine($this->app['files']); + return new PhpEngine(app()->make('files')); }); } @@ -161,9 +161,14 @@ public function registerPhpEngine($resolver) public function registerBladeEngine($resolver) { $resolver->register('blade', function () { - $compiler = new CompilerEngine($this->app['blade.compiler'], $this->app['files']); + $app = app(); - $this->app->terminating(static function () use ($compiler) { + $compiler = new CompilerEngine( + $app->make('blade.compiler'), + $app->make('files'), + ); + + $app->terminating(static function () use ($compiler) { $compiler->forgetCompiledOrNotExpired(); });