Skip to content

Commit

Permalink
Fixes Lumen issue with retrieving view component config before loaded (
Browse files Browse the repository at this point in the history
  • Loading branch information
kieranbrown authored and taylorotwell committed Oct 24, 2019
1 parent b85f8cb commit e3880cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Illuminate/Support/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,17 @@ protected function loadRoutesFrom($path)
*/
protected function loadViewsFrom($path, $namespace)
{
$view = $this->app['view'];

if (is_array($this->app->config['view']['paths'])) {
foreach ($this->app->config['view']['paths'] as $viewPath) {
if (is_dir($appPath = $viewPath.'/vendor/'.$namespace)) {
$this->app['view']->addNamespace($namespace, $appPath);
$view->addNamespace($namespace, $appPath);
}
}
}

$this->app['view']->addNamespace($namespace, $path);
$view->addNamespace($namespace, $path);
}

/**
Expand Down

0 comments on commit e3880cf

Please sign in to comment.