fork: add custom env docroot for php built-in server #516
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
A day ago, I attempted to deploy a Laravel 10.x application on Vercel using your runtime, and I encountered issues with the functionality of the api/ routes in Laravel. Despite PHP not being my primary language (yet!), I delved into the problem for about 2 hours. It turned out that there was an error related to routing and the root folder. The solution was to align the docroot of PHP in the built-in server with the location of api/index.php. This adjustment allowed my api/ routes to function correctly.
In my effort to contribute to this fantastic package, I've created a pull request that introduces the ability to choose the docroot directory through a previously defined environment variable. This modification proved immensely helpful for me. As a result, the latest versions of Laravel now deploy smoothly.