Guides
PHP
Laravel

Deploy Laravel

This article will teach you how to deploy your Laravel (opens in a new tab) project on Zeabur.

Step 1: Environment Configuration

You can test and build locally first to make sure your project can run normally. You must apply your PHP version in composer.json for Zeabur to deploy.

{
  "require": {
        "php": "8.1"
  }
}

Step 2: Create a Project (Optional)

First, you need to initialize a Laravel project in your local development environment. We can follow the instructions in the Laravel official document (opens in a new tab) to complete this step

After creation, initialize a Git repository for it and deploy it to your GitHub.

Step 3: Deploy Laravel Project

In your project, click the Deploy service or Add new service button, and select Deploy your source code.

deploy

Search for the Laravel Boot code repository you want to deploy, and click Import. Your Laravel Boot application will automatically start deploying.

Step 4: Add an APP_KEY for you Laravel project

Generating an application key or APP_KEY is one of the most important initial steps every time a Laravel developer creates or clones a Laravel application.

Switch to project variable setting page and enter your environment parameter.

You can generate a APP_KEY by enter command under your laravel project

 
php artisan key:generate
 

APP_KEY