PHPackages                             revolution/laravel-vercel-installer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. revolution/laravel-vercel-installer

ActiveLibrary

revolution/laravel-vercel-installer
===================================

Vercel Installer

1.4.0(2mo ago)133.6k—6.9%1MITPHPPHP ^8.3CI passing

Since Dec 22Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/invokable/laravel-vercel-installer)[ Packagist](https://packagist.org/packages/revolution/laravel-vercel-installer)[ GitHub Sponsors](https://github.com/invokable)[ RSS](/packages/revolution-laravel-vercel-installer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (15)Used By (0)

Laravel Vercel Installer
========================

[](#laravel-vercel-installer)

[![Maintainability](https://camo.githubusercontent.com/3d7d0c9e4193b9e2fa9c3af272e5d15856327db4523db55a02a070661c16bbe2/68747470733a2f2f716c74792e73682f6261646765732f34323865643761312d653837642d346135652d393632662d3032316263353661353666622f6d61696e7461696e6162696c6974792e737667)](https://qlty.sh/gh/invokable/projects/laravel-vercel-installer)[![Code Coverage](https://camo.githubusercontent.com/2f08c5ed3d56845b723dcb78d381be42d69f5c516c0e08af3c90e1196a6a308f/68747470733a2f2f716c74792e73682f6261646765732f34323865643761312d653837642d346135652d393632662d3032316263353661353666622f746573745f636f7665726167652e737667)](https://qlty.sh/gh/invokable/projects/laravel-vercel-installer)

Install some files to run Laravel on Vercel.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.3
- Laravel &gt;= 12.0

Installation
------------

[](#installation)

```
composer require revolution/laravel-vercel-installer --dev

php artisan vercel:install
```

### Uninstall

[](#uninstall)

```
composer remove revolution/laravel-vercel-installer --dev
```

Once you have run the command you can uninstall this package.

vercel.json
-----------

[](#verceljson)

It will probably not work with the new spec that uses `functions` and `rewrites` in vercel.json.

### regions

[](#regions)

### builds

[](#builds)

`vercel-php@0.9.0` is PHP8.5

To use another version, check this repository.

### routes

[](#routes)

If there are other files in public, add them to routes.

```
    {
        "src": "/images/(.*)",
        "dest": "/public/images/$1"
    },
```

### env

[](#env)

Secret env is set in the vercel settings page.

`php artisan key:generate --show` command generates a new key without updating the .env file. Set this key on the Settings page `APP_KEY`.

Assets
------

[](#assets)

Even if you build css/js assets during deployment, they probably won't be loaded. Since `@vercel/static` simply distributes the files included in the repository as is, `@vercel/static` cannot access files built with `vercel-php`.

There are two solutions: include pre-built files in the repository, or display assets inline with `Vite::content()`.

### Include pre-build assets

[](#include-pre-build-assets)

Build the assets locally and include them in the repository.

```
// .gitignore

!/public/build
```

### Inline assets

[](#inline-assets)

Use `Vite::content` to display assets inline instead of `@vite`.

```
    "scripts": {
        "vercel": [
            "@php artisan migrate --force",
            "npm install",
            "npm run build"
        ]
    }
```

```
{{--@vite(['resources/css/app.css', 'resources/js/app.js'])--}}

    {!! Vite::content('resources/css/app.css') !!}

    {!! Vite::content('resources/js/app.js') !!}

```

Database
--------

[](#database)

You can use AWS RDS or any public DB.

Migration command
-----------------

[](#migration-command)

If you define the migrate command in the scripts section of `composer.json`, it will be executed during deployment.

```
    "scripts": {
        "vercel": [
            "@php artisan migrate --force"
        ]
    }
```

Cache and session
-----------------

[](#cache-and-session)

`array` is default. You can't use the `file` driver.

If you're using a database, you can use the `database` driver.

We recommend using database or array with the `failover` driver.

TrustProxies
------------

[](#trustproxies)

### Laravel 10

[](#laravel-10)

If you have any problems with TrustProxies, change `/app/Http/Middleware/TrustProxies.php`.

```
class TrustProxies extends Middleware
{
    /**
     * The trusted proxies for this application.
     *
     * @var array|string|null
     */
    protected $proxies = '*';
```

### Laravel 11

[](#laravel-11)

Change `/bootstrap/app.php`

```
->withMiddleware(function (Middleware $middleware) {
        $middleware->trustProxies(at: '*');
    })
```

API prefix
----------

[](#api-prefix)

If you use Laravel's API routes, you will need to change the `/api/` route as it conflicts with Vercel.

### Laravel 11

[](#laravel-11-1)

`/bootstrap/app.php`

```
use Illuminate\Foundation\Application;

return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        web: __DIR__.'/../routes/web.php',
        commands: __DIR__.'/../routes/console.php',
        api: __DIR__.'/../routes/api.php',
        apiPrefix: 'prefix/api',
        health: '/up',
    )
```

Disable build cache
-------------------

[](#disable-build-cache)

Deployment often fails when you increase the package version in composer.json. To solve this, add `VERCEL_FORCE_NO_BUILD_CACHE` to Vercel's project settings - `Environment Variables`. Setting it in `vercel.json` probably won't solve the problem.

- `VERCEL_FORCE_NO_BUILD_CACHE` : `1`

LICENSE
-------

[](#license)

MIT

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance86

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 88.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~89 days

Total

14

Last Release

86d ago

PHP version history (3 changes)1.0.0PHP ^8.1

1.2.0PHP ^8.2

1.4.0PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/77618633?v=4)[Revolution](/maintainers/revolution)[@Revolution](https://github.com/Revolution)

---

Top Contributors

[![kawax](https://avatars.githubusercontent.com/u/1502086?v=4)](https://github.com/kawax "kawax (60 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (4 commits)")[![devin-ai-integration[bot]](https://avatars.githubusercontent.com/in/811515?v=4)](https://github.com/devin-ai-integration[bot] "devin-ai-integration[bot] (3 commits)")[![puklipo](https://avatars.githubusercontent.com/u/88759954?v=4)](https://github.com/puklipo "puklipo (1 commits)")

---

Tags

vercellaravelvercel

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/revolution-laravel-vercel-installer/health.svg)

```
[![Health](https://phpackages.com/badges/revolution-laravel-vercel-installer/health.svg)](https://phpackages.com/packages/revolution-laravel-vercel-installer)
```

###  Alternatives

[slowlyo/owl-admin

基于 laravel、amis 开发的后台框架~

61214.2k26](/packages/slowlyo-owl-admin)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[highsolutions/eloquent-sequence

A Laravel package for easy creation and management sequence support for Eloquent models with elastic configuration.

121130.3k](/packages/highsolutions-eloquent-sequence)[glhd/linen

21135.6k](/packages/glhd-linen)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
