(Basic — Stage 0)
Hook
So you've heard Laravel is one of the best ways to build web apps with PHP — but every guide you find assumes you already have five tools installed and a config file half-written. Let's start from an empty terminal and get a real, running Laravel app on your screen in the next ten minutes.
What you'll learn
- What you need installed before Laravel will even run
- How to create a brand new Laravel project from scratch
- How to start it up and see it live in your browser
- What actually just got created on your machine
Prerequisites
- A computer with a terminal (macOS, Linux, or Windows with WSL)
- Basic comfort typing commands in a terminal — you don't need to know PHP yet
- About 15 minutes
Core explanation
Laravel is a PHP framework — which means before you can install Laravel, your computer needs to speak PHP. Two tools make this painless:
- PHP itself (version 8.2 or higher for current Laravel)
- Composer — PHP's package manager. Think of it like npm for JavaScript or pip for Python: it downloads Laravel and all its pieces for you, instead of you doing it by hand.
Once those two are in place, creating a new Laravel project is a single command.
Step-by-step walkthrough
Step 1 — Check if PHP is installed
php -v
If you see a version number of 8.2 or higher, you're set. If not, install PHP first (on macOS, brew install php is the easiest route; on Windows, use WSL or Laravel Herd, which bundles everything for you).
Step 2 — Check if Composer is installed
composer -V
If this fails, grab it from getcomposer.org — it's a short installer.
Step 3 — Create a new Laravel project
composer create-project laravel/laravel my-first-app
This downloads Laravel and everything it depends on into a new folder called my-first-app. It can take a minute or two — Composer is pulling in a lot of small packages.
Step 4 — Move into the project and start it
cd my-first-app
php artisan serve
artisan is Laravel's built-in command-line tool — you'll be using it constantly. serve starts a lightweight development server.
Step 5 — See it running
Open your browser to http://127.0.0.1:8000. You should see the default Laravel welcome page. That page is real, working PHP code — you just haven't changed anything yet.
Common mistakes
- Wrong PHP version: Laravel will refuse to install if your PHP version is too old. Run
php -vagain ifcomposer create-projectthrows version errors. - Forgetting to
cdinto the project: runningphp artisan servefrom the wrong folder gives a confusing "could not open input file: artisan" error — you need to be inside the project folder. - Port already in use: if 8000 is taken by something else, run
php artisan serve --port=8080instead.
Recap
- PHP + Composer are the only two things you need before Laravel
composer create-project laravel/laravel my-first-appcreates a full new projectphp artisan serveruns it locally- The welcome page you see is a real Laravel app — everything from here is you building on top of it
Where to go next
Next up: we'll look at the .env file and config folder — the two places Laravel keeps its settings, and why you'll be opening them on day one. If you want the full structured path from here (routes → controllers → databases → auth) rather than piecing it together post by post, that's exactly what "Laravel 13 for beginners" walks you through in three focused days.