1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 16:40:05 +01:00

Allow execution of custom PHP files in Bedrock projects

All request to PHP files are directed trough index.php which results in a 404 when you try to access a php file directly
This commit is contained in:
unlocdavid
2021-09-29 12:25:19 +02:00
committed by GitHub
parent 233539d890
commit 33733b0456

View File

@@ -55,6 +55,10 @@ public function frontControllerPath($sitePath, $siteName, $uri)
? $sitePath.'/web'.$this->forceTrailingSlash($uri).'/index.php'
: $sitePath.'/web'.$uri;
}
if($uri !== '/' && file_exists($sitePath.'/web'.$uri)) {
return $sitePath.'/web'.$uri;
}
return $sitePath.'/web/index.php';
}