Laravel Reference
Why Laravel
Laravel is a PHP framework built around convention over configuration: routing, the ORM, validation, queues, caching, and authentication are all provided out of the box and designed to work together, so a new project gets a consistent structure without much upfront decision-making. That's the main appeal over assembling a stack from individual PHP libraries — less boilerplate and fewer integration decisions, at the cost of some flexibility if a project's needs fall outside what the framework expects.
Eloquent, Laravel's ActiveRecord-style ORM, is usually the biggest single reason developers pick it over a plain PHP or a leaner framework like Slim. Relationships, eager loading, query scopes, and model events cover most of what an application needs from its database layer without writing raw SQL, and the same fluency carries through to migrations, form validation, and the templating engine (Blade). The trade-off is a heavier framework with more moving parts than a minimal router-plus-database-layer setup, which matters for very small scripts but pays off quickly once an application grows past a handful of routes.
Starting a new project
composer create-project laravel/laravel PROJECTNAME
cd PROJECTNAME
Authentication scaffolding — pick one
Laravel Breeze — lightweight, modern, easiest to customise. Blade views only (no Vue/React), so the Node build tooling can be stripped out afterwards.
composer require laravel/breeze --dev
php artisan breeze:install blade
rm -rf node_modules package.json package-lock.json vite.config.js
php artisan migrate
Laravel UI + Bootstrap — older-style scaffolding, matches this project's own login/register modals.
composer require laravel/ui
php artisan ui bootstrap --auth
Further viewing
- Installing Laravel via Composer
- Breeze installation & auth scaffolding
- Breeze installation & auth scaffolding (alternate walkthrough)
- Adding an API with Sanctum
- Building an admin panel in Laravel 11
Cloning an existing Laravel repo
Starting from an existing repo — a starter kit, or just a project you're picking up — skips composer create-project entirely, but needs a few extra steps before the app will actually boot, since none of the environment-specific files (.env, the app key, vendor/) are committed to git in the first place.
git clone https://github.com/<owner>/<repo-name>.git
cd <repo-name>
composer install
cp .env.example .env
php artisan key:generate
php artisan migrate
composer install reads composer.lock to rebuild the exact vendor/ directory the repo was built against — it's git-ignored, so nothing will run without this step. .env is git-ignored too (it holds secrets like database credentials and API keys), which is why every setup guide starts by copying .env.example as a template and generating a fresh APP_KEY with key:generate rather than reusing whatever key happens to be committed to a template repo. Point the DB_* variables in .env at a real database before running migrate, or it'll fail trying to connect.
This site's own Laravel Bootstrap Starter Kit follows exactly this flow — a bare Laravel install pre-wired with Bootstrap styling and no Node/Vite build step to worry about. On GitHub, clicking Use this template → Create a new repository instead of forking gives a clean new repo with its own history, rather than one carrying the starter kit's commit log along with it.
Fundamentals
The pieces every Laravel request passes through: a route matches the URL, middleware filters or inspects the request, a controller handles the logic, and Blade renders the response.
Data
Reading and writing data, from Eloquent's ORM down to raw query building and the migration syntax that defines a table's columns in the first place.
Validation & Security
Rejecting bad input before it reaches application logic, and controlling what an authenticated user is allowed to do once they're in.
Automation & Communication
Work that happens outside the request/response cycle: scheduled jobs, custom Artisan commands, and outbound email or notifications.
Testing & Tooling
Verifying application behaviour and the local environment it runs in during development.