L

Laravel

Intermediate

PHP

Laravel is a PHP web framework with expressive, elegant syntax. It provides tools for routing, authentication, sessions, caching, and more.

web apps APIs SaaS

Before You Start

PHP 8.2+

Laravel requires modern PHP

Composer

PHP dependency manager

Database

MySQL, PostgreSQL, or SQLite

Get It Running

Recommended

Laravel Installer (Recommended)

The fastest way to create a new Laravel project.

First, open your Terminal:

+ Space type "Terminal" press Enter
1

Install Homebrew (Mac's package manager) if you don't have it

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2

Install PHP (the language Laravel uses)

brew install php
3

Install Composer (PHP's package manager)

brew install composer
4

Install the Laravel installer globally

composer global require laravel/installer
5

Add Composer's bin folder to your PATH so you can run "laravel" from anywhere

export PATH="$HOME/.composer/vendor/bin:$PATH"
6

Create a new Laravel project called "my-app"

laravel new my-app
7

Navigate into your project and start the server

cd my-app && php artisan serve
8

Open http://localhost:8000 in your browser - you should see the Laravel welcome page!

With Composer

Create a project directly with Composer (no Laravel installer needed).

These instructions work the same on Mac and Windows.

First, open your Terminal:

+ Space type "Terminal" press Enter
1

Create a new Laravel project (this downloads everything you need)

composer create-project laravel/laravel my-app
2

Navigate into your project folder

cd my-app
3

Start the development server

php artisan serve
4

Open http://localhost:8000 in your browser - you should see the Laravel welcome page!

Start Vibe Coding

Create your project, push to GitHub, and start coding with AI in one go.

First, make sure you have these installed:

  • Git - Version control
  • GitHub CLI - Create repos from terminal
  • Cursor - AI-powered code editor
Download Setup Script Recommended

Download and run a script that sets up everything automatically.

How to run on Mac

1. Open Terminal (Cmd + Space, type "Terminal")

2. Navigate to Downloads: cd ~/Downloads

3. Run: chmod +x setup-*.sh && ./setup-*.sh

How to run on Windows

1. Open your Downloads folder

2. Double-click the .bat file

3. If warned, click "More info" → "Run anyway"

Manual Setup (Copy & Paste)
# Enter a project name above to generate your script

Paste this in your terminal to create your project, initialize git, push to GitHub, and open in Cursor.

Build with Claude Code

Use Claude Code to build your Laravel project by describing what you want in plain English.

a

Get your Anthropic API key (one-time)

You'll need an API key to use Claude Code. It's free to sign up!

  1. 1. Go to console.anthropic.com and sign up or log in
  2. 2. Navigate to API Keys in the sidebar
  3. 3. Click Create Key and copy it somewhere safe
Get API Key
b

Add your API key to your system (one-time)

Run this in your terminal to save the key permanently. Replace your-api-key with your actual key.

echo 'export ANTHROPIC_API_KEY="your-api-key"' >> ~/.zshrc && source ~/.zshrc

This adds the key to your shell config so it's always available.

c

Install Claude Code (one-time setup)

Run this command once in your terminal from anywhere.

npm install -g @anthropic-ai/claude-code
d

Start Claude in your project

Navigate to your Laravel project folder, then run:

claude
e

Describe what you want to build

Claude will read your project and help you build it. Try prompts like:

"Add a responsive navbar" "Create a contact form" "Add dark mode toggle" "Explain this code"
Learn more about Claude Code

Go Live

Ready to share your Laravel project with the world? Deploy it in minutes.

Deploy Your Project

Learn More