Skip to content

Commit 6988a6f

Browse files
committed
Added view override support
Relates to #652
1 parent 96b8c40 commit 6988a6f

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

config/view.php

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?php
22

3+
$viewPaths = [realpath(base_path('resources/views'))];
4+
if ($theme = env('APP_THEME', false)) {
5+
array_unshift($viewPaths, base_path('themes/' . $theme));
6+
}
7+
38
return [
49

510
/*
@@ -13,9 +18,7 @@
1318
|
1419
*/
1520

16-
'paths' => [
17-
realpath(base_path('resources/views')),
18-
],
21+
'paths' => $viewPaths,
1922

2023
/*
2124
|--------------------------------------------------------------------------

themes/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

0 commit comments

Comments
 (0)