Download the PHP package broadcastt/broadcastt-laravel-http without Composer
On this page you can find all versions of the php package broadcastt/broadcastt-laravel-http. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download broadcastt/broadcastt-laravel-http
More information about broadcastt/broadcastt-laravel-http
Files in broadcastt/broadcastt-laravel-http
Package broadcastt-laravel-http
Short Description Laravel library for Broadcastt HTTP API
License MIT
Homepage https://broadcastt.xyz/
Informations about the package broadcastt-laravel-http
Broadcastt
Realtime web applications are the future. Broadcastt provides tools to help developers create realtime applications.
Laravel HTTP Library
Be aware that this library is still in beta and not reached the first MAJOR version.
Semantic Versioning 2.0.0
Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.
This library is compatible with Laravel 5.5+
This is an HTTP library for Laravel. If you are looking for a client library or a different server library please check out our list of libraries.
For tutorials and more in-depth documentation, visit the official site.
Documentation
First steps
Require this package, with Composer
The Broadcastt service provider is registered automatically.
If you want you can register the Broadcastt facade.
Configuration
To configure only the Broadcasting driver you have to modify config/broadcasting.php
. You have to have an item in the connections
array with its driver set to broadcastt
.
The recommended way is to use environment variables or use .env
to configure these data.
You can also use the PUSHER_APP_KEY
, PUSHER_APP_SECRET
, PUSHER_APP_ID
and PUSHER_APP_CLUSTER
environment variables respectively.
To configure other connection for the facade you should publish config/broadcastt.php
.
In the published config/broadcasting.php
file you can define many connections.
id
(Integer)
The id of the application
key
(String)
The key of the application
secret
(String)
The secret of the application
cluster
(String) Optional
The cluster of the application
Default value: eu
Additional options
useTLS
(String)
Short way to change scheme
to https
and port
to 443
debug
(Boolean)
Turns on debugging for all requests
Default value: false
basePath
(String)
The base of the path what the request will call
Default value: /apps/{AppId}
scheme
(String)
E.g. http or https
Default value: http
host
(String)
The host e.g. cluster.broadcasttapp.com. No trailing forward slash
Default value: eu.broadcasttapp.xyz
If the cluster is not set during initialization
port
(String)
The http port
Default value: 80
timeout
(String)
The http timeout
Default value: 30
Usage of broadcaster
BroadcasttServiceProvider
registers a driver for Broadcasting, so in config/broadcasting.php
you can use broadcastt
driver for broadcasting.
For example you can set BROADCAST_DRIVER
environment variable to broadcastt
.
Usage of facade
client($connection = null)
Returns a client instance
connection($connection = null)
Alias for client($connection = null)
trigger($channels, $name, $data, $socketId = null, $jsonEncoded = false)
Trigger an event by providing event name and payload.
Optionally provide a socket ID to exclude a client (most likely the sender).
triggerBatch($batch = [], $encoded = false)
Trigger multiple events at the same time.
get($path, $params = [])
GET arbitrary REST API resource using a synchronous http client.
All request signing is handled automatically.
Contributing
Everyone is welcome who would help to make this library "Harder, Better, Faster, Stronger".
All versions of broadcastt-laravel-http with dependencies
illuminate/broadcasting Version ^9.0|^10.0
illuminate/support Version ^9.0|^10.0
php Version ^8.0