Skip to content

Commit 7e27852

Browse files
authored
Merge pull request #516 from nystudio107/craft-driver-web-or-public
Craft driver web or public
2 parents 081fcf7 + 2eb4ef8 commit 7e27852

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cli/drivers/CraftValetDriver.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ public function serves($sitePath, $siteName, $uri)
2323
*/
2424
public function frontControllerDirectory($sitePath)
2525
{
26+
$dirs = ['web', 'public'];
27+
28+
foreach ($dirs as $dir) {
29+
if (is_dir($sitePath.'/'.$dir)) {
30+
return $dir;
31+
}
32+
}
33+
// Give up, and just return the default
2634
return is_file($sitePath.'/craft') ? 'web' : 'public';
2735
}
2836

0 commit comments

Comments
 (0)