We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6feafcb commit 277b819Copy full SHA for 277b819
src/Actions/AssetFileLocator.php
@@ -2,18 +2,22 @@
2
3
namespace Hyde\RealtimeCompiler\Actions;
4
5
+use Illuminate\Support\Str;
6
+
7
/**
8
* Locate a static file to proxy.
9
*/
10
class AssetFileLocator
11
{
12
public static function find(string $path): ?string
13
14
+ $path = trim($path, '/');
15
16
$strategies = [
- BASE_PATH.'/_site'.$path,
- BASE_PATH.'/_media'.$path,
- BASE_PATH.'/_site'.basename($path),
- BASE_PATH.'/_media/'.basename($path),
17
+ BASE_PATH.'/_site/'.$path,
18
+ BASE_PATH.'/_media/'.$path,
19
+ BASE_PATH.'/_site/'.Str::after($path, 'media/'),
20
+ BASE_PATH.'/_media/'.Str::after($path, 'media/'),
21
];
22
23
foreach ($strategies as $strategy) {
0 commit comments