diff --git a/src/FileSystem/Files/PublicFile.php b/src/FileSystem/Files/PublicFile.php index f4e5772..bfde9f3 100644 --- a/src/FileSystem/Files/PublicFile.php +++ b/src/FileSystem/Files/PublicFile.php @@ -36,6 +36,10 @@ public static function inPublicRoot( $at = substr($at, 0, -1); } + if (str_starts_with($at, '/') === false) { + $at = '/' . $at; + } + return new self($root, $filename, $at); }