Skip to the workspace
Pebellslearn by building
Getting Started with Laravel  ›  Lesson

Installing Laravel with Herd

Laravel Herd 12 minLaravel Herd installs PHP, Composer, the Laravel installer, Node and a web server in one app, and serves every project folder in its parked directory at a .test address.

laravel / Installing Laravel with Herd

Explore each scene at your own pace.

01 · The rule

The rule

Installing Laravel with Herd

Laravel is written in PHP, so before your first page you need PHP itself, Composer (PHP's package manager), a web server and usually Node for building CSS and JavaScript. Installing and wiring these by hand used to eat an afternoon. Laravel Herd does it in one download for macOS and Windows.

The rule

Install Herd once; every folder in ~/Herd becomes a .test site.

Herd is a desktop app. Installing it gives you, already configured:

  • PHP, and you can switch versions from the Herd menu.
  • Composer, for installing PHP packages.
  • The laravel installer command, for creating projects.
  • Node and npm, for front-end assets.
  • A web server that serves your projects automatically.

The key idea is the parked folder. By default it is ~/Herd (your home folder, then Herd). Herd serves every folder inside it at an address made from the folder name plus .test:

cd ~/Herd
laravel new lendly
# now open http://lendly.test

You do not start a server or edit any config. The folder lendly simply becomes lendly.test.

Two more commands help when your code lives somewhere else:

  • herd park in a folder makes that folder a parked folder too, so every project inside it is served.
  • herd link inside a single project serves just that project, named after its folder.

The free version of Herd covers everything in this course. The paid Herd Pro adds extras such as bundled database and mail-testing services.

Not using Herd? The route still works: install PHP and Composer yourself, create the project, then run php artisan serve, which starts a development server at http://127.0.0.1:8000.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.