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

Dry's up things

This commit is contained in:
Kennedy Tedesco
2016-05-07 14:54:19 -03:00
parent 9f4896399e
commit 1a5900beaf

View File

@@ -84,13 +84,7 @@ function show_valet_404()
/**
* Determine if the incoming request is for a static file.
*/
$uriPathInfo = pathinfo($uri);
$isPhpFile = false;
if (isset($uriPathInfo['extension']) && $uriPathInfo['extension'] === 'php') {
$isPhpFile = true;
}
$isPhpFile = pathinfo($uri, PATHINFO_EXTENSION) === 'php';
if ($uri !== '/' && ! $isPhpFile && $staticFilePath = $valetDriver->isStaticFile($valetSitePath, $siteName, $uri)) {
return $valetDriver->serveStaticFile($staticFilePath, $valetSitePath, $siteName, $uri);