Skip to content

Commit 3a95c1c

Browse files
committed
Remove hardcoded base path.
1 parent 562edeb commit 3a95c1c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/Paths.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,16 @@ trait Paths
1414
*/
1515
protected function buildPathFromArray($path, Filesystem $filesystem = null)
1616
{
17-
$pathArray = explode('/', $path);
17+
$pathArray = collect(explode('/', $path))->prepend('resources');
1818

1919
if (is_null($filesystem)) {
2020
$filesystem = new Filesystem();
2121
}
2222

23-
$base = '/';
23+
$base = base_path();
2424

25-
$resourceArray = explode('/', resource_path());
26-
27-
$all = collect($resourceArray)->merge($pathArray);
28-
29-
foreach ($all as $dir) {
30-
$base = $base.'/'.$dir;
25+
foreach ($pathArray as $path) {
26+
$base = $base.'/'.$path;
3127

3228
if (!$filesystem->exists($base)) {
3329
$filesystem->makeDirectory($base);

0 commit comments

Comments
 (0)