vemcogroup/nova-websockets

A Laravel Nova tool to integrate websockets into Nova.

1.0.0 2019-10-30 08:04 UTC

This package is auto-updated.

Last update: 2024-11-05 15:01:22 UTC


README

Latest Version on Packagist Total Downloads

This tool gives the possibiliy to create apps for Laravel Websockets and see analytics and debug.

screenshot 2019-01-31 at 12 56 20

screenshot 2019-01-31 at 12 56 35

Installation

You can install the nova tool in to a Laravel app that uses Nova via composer:

composer require vemcogroup/nova-websockets

This tool uses Laravel Websockets so you have to go through the Installation section to set it up.

Remember that Laravel Websockets is required through this tool, so no need for composer require.

Next up, you must register the tool with Nova. This is typically done in the tools method of the NovaServiceProvider.

// in app/Providers/NovaServiceProvider.php

// ...

public function tools()
{
   return [
        // ...
        new \Vemcogroup\Websockets\Websockets,
    ];
}

Next, run migration to add the new app table.

php artisan migrate

Usage

You can now use the tool via the new menu item called "Websockets"

If you want websockets to use the apps you create via this tool, change the app_provider in config\websockets.php to use the tools SocketProvider

'app_provider' => \Vemcogroup\Websockets\SocketProvider::class,

To use the Analytics/Debug menu item to analyse your websocket connections you have to change path on config\websockets.php to use the same path

'path' => 'sockets',