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

Create a New Project

Create a new project 15 minRunning laravel new asks a few questions, such as starter kit, test framework and database, then builds a ready-to-run app whose secrets live in .env.

laravel / Create a New Project

Explore each scene at your own pace.

01 · The rule

The rule

Create a New Project

You have the tools. Now one command turns an empty folder into a working Laravel app with a welcome page, a database and tests ready to run. The command asks a few questions on the way, and each answer shapes the project.

The rule

laravel new asks, builds, then .env holds the machine-specific settings.

Create Lendly with the installer:

laravel new lendly

The installer asks a short series of questions. The exact wording changes between versions, but in Laravel 12 you meet these:

  1. Starter kit: none, React, Vue or Livewire. Choosing none gives a bare app. The next section covers the kits.
  2. Testing framework: Pest or PHPUnit.
  3. Database: SQLite is the default and needs no server, since the whole database is one file in database/.
  4. Whether to run npm install and build front-end assets.

Without the installer, Composer does the same core job:

composer create-project laravel/laravel lendly

Then it builds. It downloads packages into vendor/, copies .env.example to .env, generates an APP_KEY inside it, and runs the first migrations so the default tables exist.

.env is the file for settings that differ per machine, and for secrets:

APP_NAME=Lendly
APP_ENV=local
APP_DEBUG=true
APP_URL=http://lendly.test
DB_CONNECTION=sqlite

It is listed in .gitignore, so it never goes to git. Teammates copy .env.example and fill in their own values.

To see the app, open http://lendly.test if the folder is parked in Herd. Otherwise, run composer run dev, which starts the PHP server, the Vite asset builder and a queue worker together, and open 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.