From 0d6214a1451fa889d79988b89062d73e6e259376 Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Tue, 12 Sep 2023 17:24:05 +0300 Subject: [PATCH] fix path folder if not exist in artemis --- src/CoreServiceProvider.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/CoreServiceProvider.php b/src/CoreServiceProvider.php index a4e2080..c0fbb7e 100644 --- a/src/CoreServiceProvider.php +++ b/src/CoreServiceProvider.php @@ -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);