mirror of
https://github.com/laravel/valet.git
synced 2026-02-04 16:10:08 +01:00
Add support to Symfony Flex directory structure (#475)
This commit is contained in:
committed by
Taylor Otwell
parent
4c243d7d71
commit
8d42411fa2
@@ -13,7 +13,7 @@ class SymfonyValetDriver extends ValetDriver
|
|||||||
public function serves($sitePath, $siteName, $uri)
|
public function serves($sitePath, $siteName, $uri)
|
||||||
{
|
{
|
||||||
return (file_exists($sitePath.'/web/app_dev.php') || file_exists($sitePath.'/web/app.php')) &&
|
return (file_exists($sitePath.'/web/app_dev.php') || file_exists($sitePath.'/web/app.php')) &&
|
||||||
(file_exists($sitePath.'/app/AppKernel.php')) || (file_exists($sitePath.'/web/index.php')) &&
|
(file_exists($sitePath.'/app/AppKernel.php')) || (file_exists($sitePath.'/public/index.php')) &&
|
||||||
(file_exists($sitePath.'/src/Kernel.php'))
|
(file_exists($sitePath.'/src/Kernel.php'))
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@@ -30,6 +30,8 @@ public function isStaticFile($sitePath, $siteName, $uri)
|
|||||||
{
|
{
|
||||||
if ($this->isActualFile($staticFilePath = $sitePath.'/web/'.$uri)) {
|
if ($this->isActualFile($staticFilePath = $sitePath.'/web/'.$uri)) {
|
||||||
return $staticFilePath;
|
return $staticFilePath;
|
||||||
|
} elseif ($this->isActualFile($staticFilePath = $sitePath.'/public/'.$uri)) {
|
||||||
|
return $staticFilePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -49,7 +51,7 @@ public function frontControllerPath($sitePath, $siteName, $uri)
|
|||||||
return $frontControllerPath;
|
return $frontControllerPath;
|
||||||
} elseif (file_exists($frontControllerPath = $sitePath.'/web/app.php')) {
|
} elseif (file_exists($frontControllerPath = $sitePath.'/web/app.php')) {
|
||||||
return $frontControllerPath;
|
return $frontControllerPath;
|
||||||
} elseif (file_exists($frontControllerPath = $sitePath.'/web/index.php')) {
|
} elseif (file_exists($frontControllerPath = $sitePath.'/public/index.php')) {
|
||||||
return $frontControllerPath;
|
return $frontControllerPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user