Laravel deployment
Setup automatic git deployment for your Laravel application hosted on fortrabbit.
Get ready
- Have a local development environment running
- Local Laravel installation
- Know about deployment features
- Install the fortrabbit GitHub app with your GitHub account
- Completed Laravel setup steps
Initialize Git and add GitHub
Here's an example using Git and GitHub CLI to set up a local repository and connect it to GitHub:
# Setup local git repo $ git init $ git add -A $ git commit -m 'Init' # GitHub CLI to create/connect remote Git repo $ gh repo new # Follow the steps # Push an existing local repository to github.com # Add as remote and assign current branch as 'origin'shell
At the end, the Git repo at GitHub is created and content already pushed. From now on you only need to run git add, git commit, and git push to send code changes to GitHub.
See the git deployment intro for more details on how to connect a local repo to a GitHub remote and enable automatic deployment using the fortrabbit GitHub App.
Connect your GitHub repo with fortrabbit
If you already created an app on fortrabbit, connect the repository through the app settings. If not, create a new app on fortrabbit and set up the deployment:
Choose Laravel as the software preset. Use Git deployment and select the Git repository you created previously.