🏋️♀️ It works with these frameworks and tools. Discover more at examples.
Made with ❤️ by @f3l1x (f3l1x.io) • 🐦 @xf3l1x
Majority of updates taken from pull request by @cmizzi
This repository inherits from Laravel 10.x. Important files are the following ones:
Change the version of vercel-php
dependency in .vercel.json
for the version you want to use.
vercel-php@0.7.0
- Node 18.x / PHP 8.3.x (https://vercel-laravel-10-starter.sites.treckstar.net)vercel-php@0.6.1
- Node 18.x / PHP 8.2.x (https://example-php-8-2.vercel.app)vercel-php@0.5.4
- Node 18.x / PHP 8.1.x (https://example-php-8-1.vercel.app)vercel-php@0.4.3
- Node 18.x / PHP 8.0.x (https://example-php-8-0.vercel.app)vercel-php@0.3.5
- Node 18.x / PHP 7.4.x (https://example-php-7-4.vercel.app)
Add the following snippet in the composer.json
file.
{
"scripts": {
"vercel": [
"npm install",
"npm run build"
]
}
}
See app/Http/Middleware/TrustProxies.php
.
- protected $proxies = null;
+ protected $proxies = "*";
You still need to setup the basics, such as making an .env
file, setting an APP_KEY
, etc.
Do not save your APP_KEY
in the .vercel.json
file. You must set this in the settings.
cp .env.example .env
If you do not want to change the build output folder settings, run this:
mkdir dist
echo "# for vercel output" >> dist/.gitkeep
There is a chance that your local .dotfiles
have the dist
folder in a .gitignore
file, so force add it:
git add dist -f
git commit -m "chore: dist folder for vercel output"
git push