Skip to content

Nova package to integrate laravel-websockets into Laravel Nova

License

Notifications You must be signed in to change notification settings

vemcogroup/nova-websockets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Nova tool to use Laravel Websockets

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',