Skip to content

Commit

Permalink
Merge pull request #67 from lara-zeus/fix-theme-view
Browse files Browse the repository at this point in the history
fix path folder if not exist in artemis
  • Loading branch information
atmonshi authored Sep 12, 2023
2 parents 566d39c + 0d6214a commit 10d8e25
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/CoreServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,15 @@ public static function setThemePath(string $path): void
{
$viewPath = 'zeus::themes.' . config('zeus.theme') . '.' . $path;

// check the app folder
$folder = resource_path('views/vendor/zeus/themes/' . config('zeus.theme') . '/' . $path);

if (! is_dir($folder)) {
$viewPath = 'zeus::themes.zeus.' . $path;
// check artemis folder
$folder = base_path('vendor/lara-zeus/artemis/resources/views/themes/' . config('zeus.theme') . '/' . $path);
if (! is_dir($folder)) {
$viewPath = 'zeus::themes.zeus.' . $path;
}
}

View::share($path . 'Theme', $viewPath);
Expand Down

0 comments on commit 10d8e25

Please sign in to comment.