Skip to main content

Documentation Index

Fetch the complete documentation index at: https://kawax.biz/llms.txt

Use this file to discover all available pages before exploring further.

Requirements

Before getting started with Laravel, make sure your system meets the following requirements:
  • PHP 8.3 or higher
  • Composer (PHP package manager)
  • Laravel Installer (optional but recommended)
Node.js/npm or Bun is also needed to compile front-end assets.

Installing PHP and the Laravel installer

The quickest way to install PHP, Composer, and the Laravel installer together is to run the appropriate command for your operating system:
/bin/bash -c "$(curl -fsSL https://php.new/install/mac/8.4)"
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:
composer global require laravel/installer
If you prefer a graphical PHP management tool, check out Laravel Herd as well.

Creating a new Laravel application

Once PHP, Composer, and the Laravel installer are ready, create a new application. The installer will prompt you to choose a testing framework, database, and starter kit:
laravel new example-app
After the application is created, start the development server with the dev Composer script:
cd example-app
npm install && npm run build
composer run dev
Open http://localhost:8000 in your browser to see your new application.
Starter kits automatically scaffold the application with authentication. Laravel 13 offers four options: React, Vue, Svelte, and Livewire.

Choosing a starter kit

When you run laravel new, you can pick from the following starter kits:
A React front-end starter kit powered by Inertia. Uses React 19, TypeScript, Tailwind CSS, and shadcn/ui, combining SPA-style interactions with server-side routing.
A Vue front-end starter kit powered by Inertia. Uses the Vue Composition API, TypeScript, Tailwind CSS, and shadcn-vue.
A Svelte front-end starter kit powered by Inertia. Uses Svelte 5, TypeScript, Tailwind CSS, and shadcn-svelte.
A starter kit built with Laravel Livewire, letting you build dynamic UIs using only PHP and Blade templates. Uses Tailwind CSS and Flux UI. Ideal for teams who prefer staying in PHP.
If you are not sure which stack to choose, read Frontend first for a quick comparison of Blade, Livewire, Inertia, and SPA-style setups.

Laravel Herd

Laravel Herd is a native Laravel and PHP development environment for macOS and Windows. It installs PHP, Nginx, and the Laravel CLI in one step.

macOS

  1. Download the installer from the Herd website.
  2. Run the installer — PHP is configured automatically.
  3. ~/Herd is set as the default park directory.
cd ~/Herd
laravel new my-app
cd my-app
herd open

Windows

  1. Download the Windows installer from the Herd website.
  2. Launch Herd and complete the onboarding steps.
  3. %USERPROFILE%\Herd becomes the park directory.
cd ~\Herd
laravel new my-app
cd my-app
herd open

Initial configuration

Environment file

Many of Laravel’s configuration values vary between environments. These values are managed in the .env file at the root of your project.
Never commit your .env file to source control. It contains sensitive credentials that should remain private.

Application key

A fresh installation generated by laravel new already has an application key set. If you cloned a project manually, generate one with:
php artisan key:generate

Database configuration

By default, Laravel is configured to use SQLite. To switch to MySQL or PostgreSQL, update your .env file:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
After switching from SQLite, run the migrations to create the database tables:
php artisan migrate

IDE support

Install the official Laravel VS Code Extension for syntax highlighting, snippets, Artisan command integration, and smart autocomplete for Eloquent models.
PhpStorm has built-in Laravel support, providing smart autocomplete for Blade templates, Eloquent models, routes, views, and translations.

Next steps

Routing

Learn how to define routes and handle HTTP requests in Laravel.
Last modified on May 27, 2026