Skip to main content

Requirements

Before getting started with Laravel, you need the following:
  • PHP 8.3 or higher
  • Composer (PHP’s package manager)
  • Laravel installer (optional but recommended)
You also need Node.js/npm or Bun to compile frontend assets.

Installing PHP and the Laravel installer

The easiest way to install PHP, Composer, and the Laravel installer together is to run the following command for your OS:
After running the command, restart your terminal session. If you already have PHP and Composer installed, you can install just the Laravel installer via Composer.
If you want a graphical PHP management tool, also check out Laravel Herd.

Creating a new Laravel application

Once PHP, Composer, and the Laravel installer are ready, create a new Laravel application. The installer will prompt you to choose a testing framework, database, and starter kit.
Once the application is created, start the development server with the dev Composer script.
Once the development server is running, visit http://localhost:8000 in your browser.
A starter kit automatically generates a base scaffold that includes authentication. In Laravel 13, you can choose from four options: React, Vue, Svelte, or Livewire.

Starter kit options

When you run laravel new, you can choose one of the following starter kits:
A React frontend starter kit using Inertia. It adopts React 19, TypeScript, Tailwind, and shadcn/ui, providing a modern setup that combines an SPA with server-side routing.
A Vue frontend starter kit using Inertia. It adopts the Vue Composition API, TypeScript, Tailwind, and shadcn-vue.
A Svelte frontend starter kit using Inertia. It adopts Svelte 5, TypeScript, Tailwind, and shadcn-svelte.
A starter kit using Laravel Livewire. Build dynamic UIs with PHP alone—ideal for teams that primarily use Blade templates. It adopts Tailwind and Flux UI.
If you’re unsure which setup to choose, review the differences between Blade, Livewire, Inertia, and SPAs on the Frontend page first to help you decide.

Installing with Laravel Herd

Laravel Herd is a native Laravel/PHP development environment for macOS and Windows. You can install PHP, Nginx, and the Laravel CLI in one go.

macOS

  1. Download the installer from the Herd website.
  2. Run the installer and PHP is configured automatically.
  3. The ~/Herd directory is set as the parked directory.

Windows

  1. Download the Windows installer from the Herd website.
  2. After installing, launch Herd and complete the onboarding.
  3. %USERPROFILE%\Herd becomes the parked directory.

Initial configuration

Environment configuration

Many of Laravel’s configuration values may differ per environment. For that reason, key configuration values are managed in the .env file at the root of your application.
Do not commit the .env file to source control. There is a risk of exposing sensitive information.

Database configuration

By default, Laravel is configured to use SQLite. If you want to use MySQL or PostgreSQL, update the .env file.
If you’re using a database other than SQLite, run migrations to create the tables.

IDE support

Install the official Laravel VS Code Extension to get Laravel support such as syntax highlighting, snippets, Artisan command integration, and smart autocompletion for Eloquent models.
PhpStorm has built-in Laravel framework support and provides smart autocompletion for Blade templates, Eloquent models, routes, views, and translations.

Next steps

Directory structure

Understand the key directories and files in a Laravel project.
Last modified on July 13, 2026