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: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.dev Composer script.
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 runlaravel new, you can choose one of the following starter kits:
React
React
Vue
Vue
A Vue frontend starter kit using Inertia. It adopts the Vue Composition API, TypeScript, Tailwind, and shadcn-vue.
Svelte
Svelte
A Svelte frontend starter kit using Inertia. It adopts Svelte 5, TypeScript, Tailwind, and shadcn-svelte.
Livewire
Livewire
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.
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
- Download the installer from the Herd website.
- Run the installer and PHP is configured automatically.
- The
~/Herddirectory is set as the parked directory.
Windows
- Download the Windows installer from the Herd website.
- After installing, launch Herd and complete the onboarding.
%USERPROFILE%\Herdbecomes 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.
Database configuration
By default, Laravel is configured to use SQLite. If you want to use MySQL or PostgreSQL, update the.env file.
IDE support
VS Code / Cursor
VS Code / Cursor
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
PhpStorm
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.