Creating a new Laravel project can go through Composer directly or the dedicated Laravel installer tool — both ultimately produce the exact same project structure, with the installer simply adding a friendlier interactive setup wizard on top.
Prerequisites
php -v # PHP 8.2+ for recent Laravel versions
composer -v
Creating a project via Composer directly
composer create-project laravel/laravel my-app
This is the most universally available method, needing nothing beyond Composer itself already installed — it downloads the latest stable Laravel release and its dependencies directly into a new my-app directory.
Installing and using the Laravel installer tool
composer global require laravel/installer
laravel new my-app
The installer tool adds an interactive setup wizard — prompting for a starter kit choice (Breeze, Jetstream, or none), a testing framework preference, and database configuration — none of which composer create-project alone provides; it's a convenience layer on top, not a functionally different underlying project.
Creating a project at a specific Laravel version
composer create-project laravel/laravel my-app "10.*"
Pinning a specific major version is worth doing when a project needs to match an existing team's Laravel version, or when working through documentation or a tutorial written specifically for an older release rather than the current latest one.
Running the development server
cd my-app
php artisan serve
This starts a simple built-in PHP development server (by default at http://127.0.0.1:8000) — genuinely fine for local development, but never intended for production use, which needs a real web server like Apache or Nginx as covered elsewhere on this site.
Setting up the environment file
cp .env.example .env
php artisan key:generate
composer create-project and the laravel new installer both handle these two steps automatically as part of project creation — worth knowing manually in case a project is ever cloned from an existing Git repository instead, where .env is deliberately excluded from version control and needs to be set up by hand.
The generated default project structure
my-app/
app/
bootstrap/
config/
database/
public/
resources/
routes/
storage/
.env
composer.json
Verifying the installation succeeded
php artisan --version
Following the version-checking pattern covered elsewhere on this site, this confirms both that the installation genuinely succeeded and exactly which Laravel version was actually installed, in case a version range in composer.json resolved to something other than what was expected.