Skip to content

Commit

Permalink
Merge pull request #1439 from drbyte/laravel-driver-public-php-files
Browse files Browse the repository at this point in the history
Allow LaravelValetDriver to serve other /public/*.php files
  • Loading branch information
mattstauffer authored Sep 25, 2023
2 parents 03bb9cc + cda54e1 commit e91d70f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cli/Valet/Drivers/LaravelValetDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ public function isStaticFile(string $sitePath, string $siteName, string $uri)/*:
*/
public function frontControllerPath(string $sitePath, string $siteName, string $uri): ?string
{
if (file_exists($staticFilePath = $sitePath.'/public'.$uri)
&& $this->isActualFile($staticFilePath)) {
return $staticFilePath;
}

return $sitePath.'/public/index.php';
}
}

0 comments on commit e91d70f

Please sign in to comment.