laravel-websockets/docs/getting-started/installation.md

37 lines
833 B
Markdown
Raw Permalink Normal View History

2020-06-02 08:56:13 +00:00
---
title: Installation
order: 2
---
# Installation
Laravel WebSockets can be installed via composer:
```bash
composer require beyondcode/laravel-websockets
```
The package will automatically register a service provider.
2020-08-18 12:29:49 +00:00
You need to publish the WebSocket configuration file:
2020-06-02 08:56:13 +00:00
```bash
2025-01-16 07:54:02 +00:00
php artisan vendor:publish --provider="BlaxSoftware\LaravelWebSockets\WebSocketsServiceProvider" --tag="config"
2020-06-02 08:56:13 +00:00
```
2020-08-18 12:29:49 +00:00
# Statistics
2020-06-02 08:56:13 +00:00
2020-09-11 06:25:13 +00:00
This package comes with migrations to store statistic information while running your WebSocket server. For more info, check the [Debug Dashboard](../debugging/dashboard.md) section.
2020-06-02 08:56:13 +00:00
2020-08-18 12:29:49 +00:00
You can publish the migration file using:
2020-06-02 08:56:13 +00:00
```bash
2025-01-16 07:54:02 +00:00
php artisan vendor:publish --provider="BlaxSoftware\LaravelWebSockets\WebSocketsServiceProvider" --tag="migrations"
2020-06-02 08:56:13 +00:00
```
2020-08-18 12:29:49 +00:00
Run the migrations with:
2020-06-02 08:56:13 +00:00
2020-08-18 12:29:49 +00:00
```bash
php artisan migrate
2020-06-02 08:56:13 +00:00
```