Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 421c837

Browse files
committed
Support multiple themes
1 parent 01ff261 commit 421c837

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Traits/ConsoleTools.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ trait ConsoleTools
1313
*
1414
* @override \Illuminate\Support\ServiceProvider::loadViewsFrom This method override views-loading to prepend
1515
* namespaces instead of appending, allowing extensions to have precedence and override module views.
16-
* We also removed `/vendor` from the `$appPath` variable to simplify the path.
16+
* We also changed `$appPath` to support multiple themes, and removed `/vendor` to simplify the path.
1717
*
1818
* @param string|array $path
1919
* @param string $namespace
@@ -27,7 +27,7 @@ protected function loadViewsFrom($path, $namespace)
2727

2828
if (isset($this->app->config['view']['paths']) && is_array($this->app->config['view']['paths'])) {
2929
foreach ($this->app->config['view']['paths'] as $viewPath) {
30-
if (is_dir($appPath = $viewPath.'/'.$namespace)) {
30+
if (is_dir($appPath = $viewPath.'/'.$namespace.'/views')) {
3131
$hints = $view->getFinder()->getHints();
3232

3333
if ($exists = array_search($appPath, $hints[$namespace])) {

0 commit comments

Comments
 (0)