项目作者: vemcogroup

项目描述 :
Nova package to integrate laravel-websockets into Laravel Nova
高级语言: PHP
项目地址: git://github.com/vemcogroup/nova-websockets.git
创建时间: 2019-01-31T09:47:09Z
项目社区:https://github.com/vemcogroup/nova-websockets

开源协议:MIT License

下载


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:

  1. 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.

  1. // in app/Providers/NovaServiceProvider.php
  2. // ...
  3. public function tools()
  4. {
  5. return [
  6. // ...
  7. new \Vemcogroup\Websockets\Websockets,
  8. ];
  9. }

Next, run migration to add the new app table.

  1. 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

  1. '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

  1. 'path' => 'sockets',