> ## Documentation Index
> Fetch the complete documentation index at: https://kawax.biz/llms.txt
> Use this file to discover all available pages before exploring further.

# Installatie

> Installeer Laravel en bereid je PHP-omgeving voor.

## Vereisten

Voor Laravel heb je nodig:

* **PHP 8.3 of hoger**
* **Composer**
* **Laravel installer** (optioneel, maar aanbevolen)

<Info>
  Voor frontend-assets heb je ook Node.js/npm of Bun nodig.
</Info>

## PHP en de Laravel installer installeren

Je kunt PHP, Composer en de Laravel installer samen installeren met het installatiecommando voor jouw besturingssysteem.

<CodeGroup>
  ```shell macOS theme={null}
  /bin/bash -c "$(curl -fsSL https://php.new/install/mac/8.4)"
  ```

  ```powershell Windows (uitvoeren als administrator) theme={null}
  Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://php.new/install/windows/8.4'))
  ```

  ```shell Linux theme={null}
  /bin/bash -c "$(curl -fsSL https://php.new/install/linux/8.4)"
  ```
</CodeGroup>

Herstart je terminal daarna. Als PHP en Composer al geïnstalleerd zijn, installeer je alleen de Laravel installer:

```shell theme={null}
composer global require laravel/installer
```

## Een Laravel-applicatie maken

De installer vraagt je om een testframework, database en starter kit te kiezen.

```shell theme={null}
laravel new example-app
cd example-app
npm install && npm run build
composer run dev
```

Open daarna [http://localhost:8000](http://localhost:8000) in je browser. In Laravel 13 kun je kiezen uit React, Vue, Svelte en Livewire.

<Warning>
  Commit `.env` nooit naar versiebeheer: het bestand kan gevoelige waarden bevatten.
</Warning>

## Database instellen

Laravel gebruikt standaard SQLite. Voor MySQL of PostgreSQL pas je `.env` aan:

```ini theme={null}
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
```

Voer daarna de migrations uit:

```shell theme={null}
php artisan migrate
```

## Volgende stap

<Card title="Request lifecycle" icon="arrow-right" href="/nl/lifecycle">
  Begrijp hoe Laravel HTTP-requests en consolecommando's verwerkt.
</Card>


## Related topics

- [Laravel Boost custom agent voor PhpStorm met GitHub Copilot](/nl/packages/laravel-boost-phpstorm-copilot.md)
- [Laravel Boost custom agent voor GitHub Copilot CLI](/nl/packages/laravel-boost-copilot-cli.md)
- [Wat is Laravel?](/nl/introduction.md)
- [Welcome](/index.md)
