If you are looking for a good way to use laravel's web socket please look: https://github.com/beyondcode/laravel-websockets
Laravel library for asynchronously serving WebSockets.
Build up your application through simple interfaces and re-use your application without changing any of its code just by combining different components.
install package
$ composer require orchid/socket
edit config/app.php service provider : (Laravel < 5.5)
Orchid\Socket\SocketServiceProvider::class
structure
php artisan vendor:publish
To create a new listener, you need to
php artisan make:socket MyClass
In the folder app/Http/Sockets
create template Web listener socket
After creating a need to establish a route which Is located routes/socket.php
//routing is based on an Symfony Routing Component
$socket->route('/myclass', new MyClass, ['*']);