Skip to content

Commit d970ab5

Browse files
author
James Wigger
committed
Added configurable paths
1 parent b92bb09 commit d970ab5

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## v2.1.0 - 31/10/2017
4+
* Added constant to define public path
5+
* Added constant to define layout path
6+
37
## v2.0.0 - 08/08/2017
48

59
* Renamed `mix()` to `base_asset()`

src/Base.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ public function getBasePath(): string
5858
*/
5959
public function getPublicPath(): string
6060
{
61-
return $this->getBasePath() . DIRECTORY_SEPARATOR . 'public';
61+
if (!defined('BASE_PUBLIC_DIR')) {
62+
define('BASE_PUBLIC_DIR', 'public');
63+
}
64+
65+
return $this->getBasePath() . DIRECTORY_SEPARATOR . BASE_PUBLIC_DIR;
6266
}
6367

6468
/**
@@ -68,6 +72,10 @@ public function getPublicPath(): string
6872
*/
6973
public function getLayoutPath(): string
7074
{
71-
return $this->getPublicPath() . DIRECTORY_SEPARATOR . 'layouts';
75+
if (!defined('BASE_LAYOUT_DIR')) {
76+
define('BASE_LAYOUT_DIR', 'layouts');
77+
}
78+
79+
return $this->getPublicPath() . DIRECTORY_SEPARATOR . BASE_LAYOUT_DIR;
7280
}
7381
}

0 commit comments

Comments
 (0)