Download the PHP package zavrik/laravel-centrifugo without Composer

On this page you can find all versions of the php package zavrik/laravel-centrifugo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-centrifugo

Laravel-Centrifugo For Docker

This package is an easier way for use Centrifugo v3 with Laravel Framework and Docker. It realises proxy connections inside docker for trigger events when we have some data in WebSocket Connection.

Install

1) Copy to .env

2) execute command and clear cache. 3) Add to your file this container

Usage

Autogenerate config

Command generate for Laravel and for Centrifugo. It Generates for you default proxy routes by and centrifugo keys.

Security

By Default, it uses Laravel Passport Token for identify users and possible to connect Centrifugo. You can write your own Guard by implement .

auth(Request $request): int

Give you Request with body that you can send, and you must return userID by whom WebSocket was connected.

encodeUserId(int $userId): string

Encoding User ID in unique string for security display User ID. By Default in use library.

decodeUserId(string $hashedUserId): int

Decoding Hashed User ID for correctly setUp User ID in events.

Proxy Events

Centrifugo has 4 proxy routes. We use only 3 of them because of refresh proxy unused by AuthGuard Authentication. You can select which of Users can connect to Centrifugo by Guarding You Application Token.

connect

After Successfully Guarded Your token it dispatches with UserID.

subscribe

Dispatch with UsedID and Channel Name after User successfully subscribed on Channel

publish

Dispatch with UserID, Channel and Published Data after User successfully published data in Channel

FrontEnd usage

You must use default Centrifugo JS library. Example with default BearerToken Connection:

By you can send Any data to you Request Body in AuthGuard.


All versions of laravel-centrifugo with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-bcmath Version *
laravel/framework Version ^8.0.0
centrifugal/phpcent Version ^4.0.0
laravel/passport Version ^v10.2.0
hashids/hashids Version ^4.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zavrik/laravel-centrifugo contains the following files

Loading the files please wait ....