ibrain / ib4stream
Ibrain Laravel SDK
1.1
2020-02-12 21:07 UTC
Requires
- guzzlehttp/guzzle: ~6.0
This package is not auto-updated.
Last update: 2025-06-09 04:21:21 UTC
README
client SDK for iBrain/Ib4stream based on
ibrain/ib4stream
package.
Usage
composer require ibrain/ib4stream
- register the service provider
Ibrain\Ib4stream\Providers\Ib4steamServiceProvider::class
inconfig/app.php
inproviders
. - register the facade
Ibrain\Ib4stream\Facades\Ib4streamFacade
- Publish ib4stream.js
php artisan vendor:publish --tag=ib4stream.js
- Publish ib4stream.php
php artisan vendor:publish --tag=ib4stream.php
Ib4stream::publish("mychannel");
<script src="js/ib4stream.js" type="text/javascript"></script>
window.options = {
url: "{{ config('ib4stream.wss_url') }}",
appId: "{{ config('ib4stream.app_id') }}"
}
Ib4stream(options, (os) => {
os.subscribe("mychannel", (data) => {
// Action Here
});
});