Download the PHP package rbadillap/twitterstreaming-laravel without Composer
On this page you can find all versions of the php package rbadillap/twitterstreaming-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package twitterstreaming-laravel
TwitterStreaming Laravel 5 Service Provider
We are now supporting TwitterStreamingPHP with Laravel 5 through a Service Provider :)
Installation
This TwitterStreamingPHP Service Provider can be installed via Composer. Running the following command:
composer require rbadillap/twitterstreaming-laravel
Now you should register the provider in the Laravel application in your config/app.php
configuration file:
Also, add the TwitterStreaming
facade in the aliasses
array (located in the same file).
Also you may want to create a twitterstreaming.php
configuration file, to do that and put on it the credentials of your Twitter App you should run the following command:
php artisan vendor:publish
Now, you can see a new file created in the app
folder where you can add your credentials.
And ready to use!
Usage
To understand how to use TwitterStreamingPHP please visit its documentation
Extras
Within this Service Package you will find some extra methods to simplify the way to work with TwitterStreamingPHP in Laravel. Let's take a look all of them:
Simplified way to define the endpoints
Instead of define the endpoints using the endpoint
method in TwitterStreamingPHP you can call some methods which injects the endpoint (and its types) directly. For example:
All the methods to simplify the endpoints definitions listed here:
Integration with Filters module
Are you using Filters module?
If no, well, you should :)
If yes, we have been integrated into the Laravel Service Provider.
The only thing that you need to use is require the package using composer:
composer require rbadillap/twitterstreaming-filters
And use it without the need to register the new extension.
How can I use it in Laravel
There is some ways, but if you wanna combine Laravel and TwitterStreamingPHP you can create your own command
php artisan make:console TwitterTrack
And put your logic to track tweets.
Even better, you could dispatch a queue listener to store in database.
Contributing
Use the same workflow as many of the packages that we have here in Github.
- Fork the project.
- Create your feature branch with a related-issue name.
- Try to be clear with the code committed and follow the PSR-2 Coding Style Guide.
- Run the tests (and create your new ones if necessary).
- Commit and push the branch.
- Create the Pull Request.