Cookies ahead

Our support chat tool "Intercom" would like to collect some more data on you. See the related link for more details.

Docs

Laravel setup

Reviewedbyfl

Markdown ↓

Set up your Laravel application locally with environment variables and database configuration before deploying to fortrabbit.

Get ready

Prepare your local environment with Laravel installed and Git configured, plus the fortrabbit GitHub App for automatic deployments.

Create an app at fortrabbit

Create a new app in the fortrabbit dashboard. The wizard will guide you through the steps. You can connect the repo from GitHub.

Software template

If Laravel is detected or you have chosen it in the software list, the Laravel software template will be applied. This will pre-configure common ENV vars, build and post-deploy commands and set the root path to public.

MySQL configuration

Not all Laravel projects require a database connection. When your app does, keep config/database.php as is when using the Laravel software template. The CAPITAL environment variable names (like DB_HOST, DB_PASSWORD) in config/database.php will be populated by fortrabbit automatically when you add a database. For local development, populate your .env file with your local database credentials. See the ENV var topic for more details.

This configuration enables your app to connect to the database.

Written by a human. Review, grammar checks and typo fixes by AI.

AI use & editorial processEdit on GitHub ↗