Back to writing

Writing

My Laravel Dev Setup in 2026 (and how to build your own)

May 31, 20265 min read

I'm learning Laravel with a real goal: ship a portfolio project and land a backend internship. Along the way I kept asking "what do actual Laravel devs use?" — so I researched it, tried it, and settled on a setup that's fast, mostly free, and beginner-friendly.

This is that setup. It's part personal picks and part how-to — by the end you could rebuild it on your own Mac.

The 30-second version

| Layer | My pick | Why | | --- | --- | --- | | Editor / IDE | PhpStorm + Laravel Idea | Understands Laravel, not just PHP | | PHP + Composer | Herd Lite | One command, no fuss | | Database (learning) | SQLite | Zero setup — it's just a file | | Database (real apps) | MySQL via Homebrew | Production parity | | Quality tools | Pint, Larastan, IDE Helper | Clean code on autopilot |

If you remember nothing else: PhpStorm for the editor, Herd for PHP. That combo is what most Laravel devs reach for in 2026.

The IDE: PhpStorm

About 60% of Laravel devs use PhpStorm, and the reason is simple — it understands Laravel. Routes, Eloquent models, Blade templates, config keys: it autocompletes all of them. VS Code can get close, but only after stacking 20+ extensions that fight each other.

The unlock is the Laravel Idea plugin, which is now bundled free:

  • Jump from a route straight to its controller method
  • Autocomplete database columns on your Eloquent models
  • Generate models, migrations, and controllers from a menu

If you're a student, PhpStorm is free with the JetBrains student license. That's how I'm running it.

Point it at the right PHP

PhpStorm is an IDE, not just a text editor — it actually runs PHP to check your code and run tests. So tell it which PHP to use under Settings PHP CLI Interpreter, pointing at your Herd PHP:

~/.config/herd-lite/bin/php

Two shortcuts that replaced most of my menu-hunting on day one:

⇧⇧      Search Everywhere (files, classes, settings, actions)
⌘⇧A     Find Action (when you forget where a setting lives)

PHP and Composer: Laravel Herd

Installing PHP on a Mac used to mean Homebrew headaches or bloated stacks like XAMPP. Herd fixed that. The Laravel team ships a one-line installer that drops a clean PHP and Composer onto your machine:

curl -fsSL https://php.new/install/mac | bash

That gives you Herd Lite — PHP and Composer, nothing else. It's all you need to start:

php -v                 # PHP 8.4.x
composer --version     # Composer 2.x

When you outgrow it — multiple sites at once, *.test URLs, switching PHP versions — install the full Herd app. It absorbs your Herd Lite config automatically. I haven't needed to yet; Lite plus php artisan serve is plenty while learning.

Creating and running a project

composer create-project laravel/laravel my-app
cd my-app
php artisan serve      # http://127.0.0.1:8000

Laravel ships with a small frontend toolchain (Vite and Tailwind), so for anything with styling you run a second terminal:

npm install
npm run dev            # watches and rebuilds CSS/JS

Two terminals, side by side: PHP on one, Vite on the other. That's the daily loop.

Database: SQLite while learning

This is the tip I wish I'd had sooner. For learning, skip MySQL setup entirely and use SQLite — it's a single file, no server, no password:

# .env
DB_CONNECTION=sqlite
php artisan migrate    # creates database/database.sqlite + your tables

The migration and Eloquent code is identical to MySQL, so nothing you learn is wasted. When you build something real, switch the .env to MySQL (I install it with Homebrew: brew install mysql) and everything just works.

The tools that earn their place

Add these to every project on day one — they make clean code almost automatic:

| Tool | What it does | Install | | --- | --- | --- | | Laravel Pint | Auto-formats your code | ships with Laravel | | Larastan | Catches bugs before runtime | composer require --dev larastan/larastan | | IDE Helper | Makes models and facades autocomplete | composer require --dev barryvdh/laravel-ide-helper | | Telescope | In-browser request and query inspector | composer require laravel/telescope | | Debugbar | Spots N+1 queries on every page | composer require --dev barryvdh/laravel-debugbar |

For a database GUI, PhpStorm's built-in Database panel reads your schema and autocompletes columns inside Eloquent queries — so I haven't needed a separate app like TablePlus yet.

Habits worth copying

A few things the Laravel community swears by that genuinely improved my code:

  • Keep logic out of routes. Routes point to controllers; controllers stay thin.
  • Validate with Form Requests, not inline checks scattered around.
  • Reach for Eloquent before raw SQL — it's the whole reason to pick Laravel.
  • Learn Tinker (php artisan tinker). It's a live REPL into your app and most beginners underuse it.
  • Run Pint and Larastan as pre-commit hooks so you never argue about formatting in a pull request.

Copy-paste starter

Here's the whole thing, condensed:

# 1. PHP + Composer
curl -fsSL https://php.new/install/mac | bash

# 2. New project
composer create-project laravel/laravel my-app
cd my-app

# 3. Use SQLite (edit .env: DB_CONNECTION=sqlite)
php artisan migrate

# 4. Quality tools
composer require --dev larastan/larastan barryvdh/laravel-ide-helper

# 5. Run it (two terminals)
php artisan serve
npm install && npm run dev

Then open the folder in PhpStorm, install the Laravel Idea plugin, point the CLI interpreter at Herd's PHP, and you're building.


This is a living setup — I'll update it as I learn. If you're starting Laravel too, I hope it saves you the week of research it cost me. Onward.