kristiansnts/vercel-laravel 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kristiansnts/vercel-laravel

最新稳定版本:v1.0.0

Composer 安装命令:

composer require kristiansnts/vercel-laravel

包简介

Generate Vercel deployment files for Laravel applications

README 文档

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 deployment
  • vercel.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

  1. Review and update the APP_URL in vercel.json with your production URL
  2. Add any additional environment variables to vercel.json as needed
  3. Deploy to Vercel using the Vercel CLI or GitHub integration

License

MIT

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-24