Laravel setup

Published

Updated

Create a fortrabbit app for Laravel. The Laravel software template sets the root path to public, the ENV vars for app and database, and the build and post deploy commands, so Laravel runs without config changes.

Get ready

Create an app at fortrabbit

Create an app in the dashboard and connect the GitHub repository.

Software template

When Laravel is detected or chosen, the Laravel software template applies:

Laravel 13, 12, 11, 10, 9, 8, 7, 6, 5, 4

DeploymentValue
Root pathpublic
Deploy strategyreplace
Excluded paths/storage/node_modules
Build commandscomposer install --no-dev --prefer-dist --no-interaction --no-ansi --no-progress
Post-deploy commandsmkdir -p storage/framework/{sessions,views,cache}php artisan migrate --force
Environment variablesValue
APP_DEBUGfalse
APP_ENVproduction
APP_KEY!RANDOM_KEY!
APP_URLhttps://${FORTRABBIT_MAIN_DOMAIN}
LOG_CHANNELstack
LOG_STACKstderr
Database environment variablesValue
DB_CONNECTION${FORTRABBIT_DB_TYPE}
DB_DATABASE${FORTRABBIT_DB_NAME}
DB_HOST${FORTRABBIT_DB_HOST}
DB_PASSWORD${FORTRABBIT_DB_PASSWORD}
DB_PORT${FORTRABBIT_DB_PORT}
DB_USERNAME${FORTRABBIT_DB_USER}

MySQL configuration

Keep config/database.php as it is. The template fills DB_HOST, DB_PASSWORD and the other DB_* variables from the MySQL component. Locally, the .env file holds the local credentials, see ENV vars.

Written by humans and AI in collaboration.

AI use & editorial processEdit on GitHub ↗