Skip to content

Commit a9f959a

Browse files
Merge pull request #44 from hexadog/develop
fix(theme): typo default view paths access
2 parents 49ead30 + 6d6e2e5 commit a9f959a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Theme.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public function __construct($path)
5656
if ($this->isActive()) {
5757
// Add theme.THEME_NAME namespace to be able to force views from specific theme
5858
View::prependNamespace('theme.' . $this->getSnakeName(), $this->getPath('resources/views'));
59+
View::replaceNamespace('theme', $this->getPath('resources/views'));
5960
}
6061
}
6162

@@ -440,10 +441,10 @@ protected function registerViews($defaultViewPaths, $defaultMailViewPaths)
440441
}, $paths);
441442

442443
// Update config view.paths to work with errors views
443-
if (is_array($this->defaultViewPaths)) {
444+
if (is_array($defaultViewPaths)) {
444445
Config::set('view.paths', array_merge($paths, $defaultViewPaths));
445446
} else {
446-
Config::set('view.paths', $paths);
447+
Config::set('view.paths', array_merge($paths, [$defaultViewPaths]));
447448
}
448449

449450
// Register all vendor views

0 commit comments

Comments
 (0)