Introduction

Deployments in Laravel Cloud happen whenever you have new code to release, new resources to attach, or environment settings that you want to update.

When a new deployment is triggered, Laravel Cloud will take your code and environment settings, build a Docker image with the applicable PHP version, extensions, and other configurations fine-tuned for Laravel, and then run your build and deploy commands.

Once your build completes successfully, the existing deployment will be gracefully terminated (allowing any running processes to complete) and the new deployment will be brought online with zero downtime.

Deploy Options

Push to Deploy

Every time you push new code to your remote git branch, a new deploy is automatically triggered. Push to deploy is enabled by default on all environments. To change this setting, go to Settings > Deployments.

Deploy Hooks

If you prefer to trigger a deployment via an HTTP endpoint, you can enable the “Deploy hook” option in Settings > Deployments. When enabled, you will be provided a URL that you can make a POST request to as part of your CI/CD flow. You can refresh your URL anytime from the Deployments settings.

Manual

You can trigger a deployment from the Laravel Cloud dashboard anytime by clicking the “Deploy” button from the Environment overview page or Deployments page. After updating environment settings, you can also click “Save & Deploy” to manually trigger a deployment.

Troubleshooting

Laravel Framework Version Not Supported

Laravel Cloud requires Laravel 9 or greater. In addition, you should be using the latest minor version of the laravel/framework Composer package. The minimum minor versions required are:

  • Laravel 11: v11.41.3
  • Laravel 10: v10.48.28
  • Laravel 9: v9.52.20

If you receive an error during a deployment that “The [laravel/framework] package was found in the [composer.lock] file, but the version is not supported. Upgrade Laravel to the latest minor version” then you can update by running the following command:

composer update laravel/framework