2017 © Pedro Peláez
 

library laravel-stream

Stream bridge for Laravel 5.

image

techinasia/laravel-stream

Stream bridge for Laravel 5.

  • Monday, February 6, 2017
  • by techinasia
  • Repository
  • 12 Watchers
  • 1 Stars
  • 0 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Laravel Stream

Dependency Status Build Status Coverage Status StyleCI Status, (*1)

Stream.io bridge for Laravel 5., (*2)

Contents

Features

  • Wrapper for Stream's low-level PHP client.
  • Multiple applications support.
  • Laravel facade for client.

Installation

Install this package with Composer: ``` bash composer require techinasia/laravel-stream, (*3)


Register the service provider in your `config/app.php`: ``` php Techinasia\GetStream\StreamServiceProvider::class

[Optional] Register the facade in your config/app.php, under aliases: ``` php 'Stream' => Techinasia\GetStream\Facades\Stream::class, (*4)


## Configuration Publish all the vendor assets: ``` bash php artisan vendor:publish

This will create a file called stream.php in the config folder. Create an application via Stream's admin interface and copy the API key and secret to the configuration file., (*5)

You can add more applications by adding more key/secret pairs to the configuration file:, (*6)

``` php 'applications' => [ 'main' => [ 'key' => 'key1', 'secret' => 'secret1', ], 'foo' => [ 'key' => 'foo', 'secret' => 'bar', ], ],, (*7)


## Examples ``` php use Techinasia\GetStream\Facades\Stream; // Add an activity to a user feed via the default application. $feed = Stream::feed('user', 1); $feed->addActivity([ 'actor' => 1, 'verb' => 'like', 'object' => 3, 'foreign_id' => 'post:42', ]); // Add another activity to a user feed via another application. $feed = Stream::application('another')->feed('user', 1); $feed->addActivity([ 'actor' => 1, 'verb' => 'like', 'object' => 3, 'foreign_id' => 'post:42', ]);

Changelog

Please see CHANGELOG for more information for what has changed recently., (*8)

Testing

bash composer test, (*9)

Security

If you discover any security related issues, please email dev@techinasia.com instead of using the issues tracker., (*10)

Contributing

Please see CONTRIBUTING for details., (*11)

Credits

License

The MIT License (MIT). Please see License File for more information., (*12)

The Versions