Download the PHP package jacked-php/live-belt without Composer

On this page you can find all versions of the php package jacked-php/live-belt. 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 live-belt

Live Belt

Livewire Component for Real Time interactions using Laravel Conveyor Driver.

Video: https://www.youtube.com/watch?v=nQgMK2r_gww

Installation

Step 1: install package

Step 2: add service provider

Add the following to your bootstrap/providers.php file:

`

Step 3: install dependencies for JS

Comment import './echo'; from resources/js/bootstrap.js.

Then add this to your app.js:

At this stage, be sure to follow the steps 1 to 5 at the Laravel Conveyor Driver documentation.

Step 4: adjust configuration

Add the following to your config/broadcasting.php file:

Set the configurations for the WebSocket server in the .env file:

Usage

First, check the Laravel Conveyor Driver documentation to set up your Laravel project.

Add this to your scripts area:

This example will write to your console log.

You can communicate with it using this example event:

Dispatch it like this and see the console log of your browser:

Events

In Live Belt, you can listen to conveyor events and send messages with them. As seen above in the "Usage" section, you can already send events leveraging the Laravel Broadcasting system. You can also broadcast from the front end!

Let's start by examining the cases of listening events in the backend and front end. Then, we will visit the case of triggering events from the front end.

Listening Live Belt events

To listen to events in the backend, you can just listen to the event \LiveBelt\Events\OnConveyorMessage. That way, whenever you receive some event from Conveyor Server, you'll be able to react to it in the backend.

Here is an example:

In the front end, you can listen to events thrown in the window scope: onConveyorMessage. Here is an example:

Triggering Live Belt events

To trigger events to Conveyor Server from the frontend, you just dispatch the event onConveyorMessageBroadcast in the window scope. You must send the channel you want to send to and the message. Both fields are required. Here is an example:

Notes


All versions of live-belt with dependencies

PHP Build Version
Package Version
Requires kanata-php/conveyor-laravel-broadcaster Version ^0.1
livewire/livewire Version ^3.5
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 jacked-php/live-belt contains the following files

Loading the files please wait ....