kristiansnts / vercel-laravel
Generate Vercel deployment files for Laravel applications
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/kristiansnts/vercel-laravel
Requires
- php: ^8.1|^8.2|^8.3
- illuminate/console: ^10.0|^11.0
- illuminate/support: ^10.0|^11.0
This package is not auto-updated.
Last update: 2025-12-23 00:07:31 UTC
README
A simple Composer package to generate Vercel deployment files for Laravel applications.
Inspired by Caleb Porzio's article on deploying Laravel to Vercel.
Installation
Add the package to your Laravel project:
composer require kristiansnts/vercel-laravel
Or install it as a local package by adding this to your main composer.json:
"repositories": [ { "type": "path", "url": "./packages/vercel-laravel" } ]
Then run:
composer require kristiansnts/vercel-laravel
Usage
Run the setup command to generate all required Vercel files:
php artisan vercel:setup
This will create:
api/index.php- Entry point for Vercel serverless functions.vercelignore- Files to ignore during deploymentvercel.json- Vercel deployment configuration
Files Generated
api/index.php
Forwards Vercel requests to your Laravel application's public/index.php.
.vercelignore
Excludes the vendor directory from deployment (Vercel will install dependencies).
vercel.json
Contains the complete Vercel configuration including:
- Build settings for PHP and static assets
- Routing rules for assets and API endpoints
- Environment variables for production deployment
After Generation
- Review and update the
APP_URLinvercel.jsonwith your production URL - Add any additional environment variables to
vercel.jsonas needed - Deploy to Vercel using the Vercel CLI or GitHub integration
License
MIT