Download the PHP package ably/laravel-broadcaster without Composer

On this page you can find all versions of the php package ably/laravel-broadcaster. 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-broadcaster

Ably Broadcaster for Laravel

Latest Stable Version Total Downloads License

Ably is the platform that powers synchronized digital experiences in realtime. Whether attending an event in a virtual venue, receiving realtime financial information, or monitoring live car performance data – consumers simply expect realtime digital experiences as standard. Ably provides a suite of APIs to build, extend, and deliver powerful digital experiences in realtime for more than 250 million devices across 80 countries each month. Organizations like Bloomberg, HubSpot, Verizon, and Hopin depend on Ably’s platform to offload the growing complexity of business-critical realtime data synchronization at global scale. For more information, see the Ably documentation.

This implements ably broadcaster as a independent service provider library for Laravel using ably-php. This library works with the ably-js based ably-laravel-echo client framework with enhanced features. This project is the successor to the pusher-client based ably broadcaster.

Features

Bug Fixes

Requirements

  1. PHP version >= 7.2.0
  2. Laravel version >= 6.0.0

Installation

You can install the package via composer

Setup

  1. Update .env file, set BROADCAST_DRIVER as ably and specify ABLY_KEY.

Warning - Do not expose ABLY_KEY to client code.

  1. Uncomment BroadcastServiceProvider in config/app.php

        /*
         * Application Service Providers...
         */
        App\Providers\AppServiceProvider::class,
        App\Providers\AuthServiceProvider::class,
        App\Providers\BroadcastServiceProvider::class,
        App\Providers\EventServiceProvider::class,
        App\Providers\RouteServiceProvider::class,
    
  2. If running Laravel 8 or older, edit config/broadcasting.php, add ably section to the connections array

Finally, you are ready to install and configure Ably Laravel Echo, which will receive the broadcast events on the client-side.

Using Laravel Echo on client-side

Ably Laravel Echo is a JavaScript library that makes it painless to subscribe to channels and listen for events broadcast by your server-side broadcasting driver. Ably is maintaining a fork of the official laravel-echo module which allows you to use the official ably-js SDK. In this example, we will also install the official ably package:

Once Echo is installed, you are ready to create a fresh Echo instance in your applications JavaScript. A great place to do this is at the bottom of the resources/js/bootstrap.js file that is included with the Laravel framework. By default, an example Echo configuration is already included in this file; however, the default configuration in the bootstrap.js file is intended for Pusher. You may copy the configuration below to transition your configuration to Ably.

Please take a look at the Ably Laravel Echo Docs for more information related to configuring ably-specific client options and implementing additional features.

Once you have uncommented and adjusted the Echo configuration according to your needs, you may compile your application's assets:

Configure advanced features

1. Modify private/presence channel capability. Default: Full capability

2. Disable public channels. Default: false

3. Update token expiry. Default: 3600 seconds (1 hr)

4. Use internet time for issued token expiry. Default: false

Migrating from pusher/pusher-compatible broadcasters

The Ably Laravel broadcaster is designed to be compatible with all Laravel broadcasting providers, such as Pusher, Ably with the Pusher adapter, and all Pusher compatible open source broadcasters. Follow the below steps to migrate from other broadcasters.

1. Leaving a channel

To leave channel on the client side, use Ably Channel Namespaces conventions, instead of Pusher Channel Conventions.

2. Error handling

Note :

Addtional Documentation

Example

Public room example


Testing

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Ensure you have added suitable tests and the test suite is passing (run vendor/bin/phpunit)
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request

Release Process

This library uses semantic versioning. For each release, the following needs to be done:

  1. Create a new branch for the release, named like release/1.2.4 (where 1.2.4 is what you're releasing, being the new version).
  2. Update the lib version in src/AblyBroadcaster.php.
  3. Run github_changelog_generator to automate the update of the CHANGELOG.md. This may require some manual intervention, both in terms of how the command is run and how the change log file is modified. Your mileage may vary:
    • The command you will need to run will look something like this: github_changelog_generator -u ably -p laravel-broadcaster --since-tag v1.2.4 --output delta.md --token $GITHUB_TOKEN_WITH_REPO_ACCESS. Generate token here.
    • Using the command above, --output delta.md writes changes made after --since-tag to a new file.
    • The contents of that new file (delta.md) then need to be manually inserted at the top of the CHANGELOG.md, changing the "Unreleased" heading and linking with the current version numbers.
    • Also ensure that the "Full Changelog" link points to the new version tag instead of the HEAD.
  4. Commit generated CHANGELOG.md file.
  5. Make a PR against main.
  6. Once the PR is approved, merge it into main.
  7. Add a tag and push it to origin - e.g.: git tag v1.2.4 && git push origin v1.2.4.
  8. Visit https://github.com/ably/laravel-broadcaster/tags and add release notes for the release including links to the changelog entry.
  9. Visit https://packagist.org/packages/ably/laravel-broadcaster, log in to Packagist, and click the "Update" button.

All versions of laravel-broadcaster with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2 || ^8.0
ably/ably-php Version ^1.1
illuminate/support Version ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0
ext-json Version *
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 ably/laravel-broadcaster contains the following files

Loading the files please wait ....