Skip to content

NOW MANAGED ON CODEBERG

Added view override support

Dan Brown6988a6ff88a9
diff --git a/config/view.php b/config/view.php
index e193ab61d..8dc2841e7 100644
--- a/config/view.php
+++ b/config/view.php
@@ -1,5 +1,10 @@
<?php
+$viewPaths = [realpath(base_path('resources/views'))];
+if ($theme = env('APP_THEME', false)) {
+ array_unshift($viewPaths, base_path('themes/' . $theme));
+}
+
return [
/*
@@ -13,9 +18,7 @@ return [
|
*/
- 'paths' => [
- realpath(base_path('resources/views')),
- ],
+ 'paths' => $viewPaths,
/*
|--------------------------------------------------------------------------
diff --git a/themes/.gitignore b/themes/.gitignore
new file mode 100755
index 000000000..d6b7ef32c
--- /dev/null
+++ b/themes/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore