Install Laravel locally

Published

Updated

Install Laravel on the local machine with Composer or the Laravel installer, develop there, and push the code to GitHub. fortrabbit deploys it from there.

Get ready

Have a local development environment up and running.

Install Laravel on your local machine

Follow the Laravel installation guide. In short:

# Install the Laravel installer
composer global require laravel/installer

# Create a Laravel project
laravel new {project_folder_name}
shell

Some software runs on top of Laravel, such as Statamic, Filament or October CMS.

Develop locally

Build the app in the local environment. Hosting is needed once there is something to show.

Set up GitHub

For Git deployment, put the code in a GitHub repository, public or private. With the GitHub CLI:

# 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

Written by humans and AI in collaboration.

AI use & editorial processEdit on GitHub ↗