Master Laravel 12: Build Full-Stack Apps in 5 Steps

Master Laravel 12: Build Full-Stack Apps in 5 Steps

🧰

Instant Toolkit

3 artifacts

📋
Step-by-Step Guide

1

Prerequisites

  • PHP 8.2+ (recommended 8.4 via php.new)
  • Composer
  • Node.js/NPM or Bun
  • Code editor like VS Code

Install PHP, Composer, Laravel Installer

macOS/Linux:

/bin/bash -c "$(curl -fsSL https://php.new/install/mac/8.4)"  # or linux

Windows PowerShell (Admin):

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://php.new/install/windows/8.4'))

Create New App

laravel new my-app
cd my-app
npm install
npm run build
composer run dev

Visit http://localhost:8000. See Official Installation.

Configure .env for DB if needed (SQLite default).

Why this step matters:
  • -Establishes a reliable local dev setup for experimentation
  • -Enables immediate hands-on coding without setup hurdles
1-2 hours
PHP 8.2+, Composer, Node.js/NPM, VS Code, Laravel Installer
$0
Definition of Done
  • Laravel app runs at http://localhost:8000
  • php artisan --version shows 12.x
  • No errors in npm install or composer run dev
Common Mistakes to Avoid

Forgetting to run npm install and build

Always run npm install && npm run build after laravel new

Committing .env to Git

Add .env to .gitignore; use .env.example

Wrong PHP version

Verify with php -v; reinstall via php.new if needed

2

Following along, or just reading? 👀

Spin up a personalized “learn Laravel” plan you can save, check off, and return to anytime — unlimited on the free trial.

Start free trial →
3
4
5