Skip to content

Commit 4cce108

Browse files
committed
feat: allow LaravelValetDriver to serve other /public/*.php files
When PHP files other than `index.php` exist in `/public/` this allows them to be served by the Laravel driver.
1 parent f28129d commit 4cce108

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cli/Valet/Drivers/LaravelValetDriver.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ public function isStaticFile($sitePath, $siteName, $uri) {
7070
* @return string
7171
*/
7272
public function frontControllerPath($sitePath, $siteName, $uri) {
73+
if (file_exists($staticFilePath = "$sitePath/public$uri") && $this->isActualFile($staticFilePath)) {
74+
return $staticFilePath;
75+
}
7376

7477
return "$sitePath/public/index.php";
7578
}

0 commit comments

Comments
 (0)