Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Commit 59e6708

Browse files
committed
fix assets path with env
1 parent a12772b commit 59e6708

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

common/helpers.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@
66
/**
77
* Returns laravel-generator composer dist path.
88
*
9-
* @param string|null $asset string
9+
* @param string|null $asset
1010
* @return string
1111
*/
1212
function laravel_generator_dist_path(string $asset = null): string
1313
{
1414
$defaultPath = config('laravel-generator.defaults.paths.ui_package_path').'/dist/';
15-
$path = base_path(config('laravel-generator.defaults.paths.laravel_generator_assets_path', $defaultPath));
15+
$assetPath = config('laravel-generator.defaults.paths.laravel_generator_assets_path', $defaultPath);
16+
if (! str_ends_with($assetPath, '/')) {
17+
$assetPath .= '/';
18+
}
19+
$path = base_path($assetPath);
1620

1721
if (! $asset) {
1822
return realpath($path);

0 commit comments

Comments
 (0)