Skip to content
This repository was archived by the owner on Feb 14, 2023. It is now read-only.

Commit 463f1e4

Browse files
committed
Lumen compatibility: Do not use public_path() helper
1 parent a4ecf15 commit 463f1e4

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased](https://github.com/mll-lab/laravel-graphql-playground/compare/v2.0.1...master)
99

10+
### Fixed
11+
12+
- Lumen compatibility: Do not use `public_path()` helper
13+
1014
## [v2.0.1](https://github.com/mll-lab/laravel-graphql-playground/compare/v2.0.0...v2.0.1)
1115

1216
### Fixed

src/DownloadAssetsCommand.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ class DownloadAssetsCommand extends Command
2424
public function handle(): void
2525
{
2626
$this->fileForceContents(
27-
public_path(self::CSS_PATH_LOCAL),
27+
self::publicPath(self::CSS_PATH_LOCAL),
2828
file_get_contents('https:'.self::CSS_PATH_CDN)
2929
);
3030
$this->fileForceContents(
31-
public_path(self::JS_PATH_LOCAL),
31+
self::publicPath(self::JS_PATH_LOCAL),
3232
file_get_contents('https:'.self::JS_PATH_CDN)
3333
);
3434
$this->fileForceContents(
35-
public_path(self::FAVICON_PATH_LOCAL),
35+
self::publicPath(self::FAVICON_PATH_LOCAL),
3636
file_get_contents('https:'.self::FAVICON_PATH_CDN)
3737
);
3838
}
@@ -66,14 +66,14 @@ public static function faviconPath(): string
6666
return self::assetPath(self::FAVICON_PATH_LOCAL, self::FAVICON_PATH_CDN);
6767
}
6868

69-
protected static function assetPath(string $local, string $cdn)
69+
protected static function assetPath(string $local, string $cdn): string
7070
{
7171
return file_exists(self::publicPath($local))
7272
? self::asset($local)
7373
: $cdn;
7474
}
7575

76-
protected static function asset(string $path)
76+
protected static function asset(string $path): string
7777
{
7878
return app('url')->asset($path);
7979
}

0 commit comments

Comments
 (0)