This repository has been archived by the owner on Aug 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from simonhamp/patch-laravel-5.5
Update for Laravel 5.5
- Loading branch information
Showing
9 changed files
with
155 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,36 @@ | ||
# laravel-zmq | ||
# Laravel ZeroMQ | ||
|
||
subscribe laravel worker to zmq notifications i.e to verify btcoind tx | ||
A Laravel wrapper for `ext-zmq` that exposes a `zmq` broadcast driver to publish your Laravel events via ZeroMQ. | ||
|
||
## Requirements | ||
* zmq php ext | ||
* laravel 5.2 | ||
|
||
- PHP 7.1 | ||
- Laravel 5.5 | ||
- ZeroMQ | ||
- ext-zmq for PHP | ||
|
||
## Installation | ||
include the service provider into your laravel app | ||
|
||
```bash | ||
$ composer require pelim/laravel-zmq | ||
``` | ||
|
||
`php artisan vendor:publish` | ||
The service provider is loaded automatically in Laravel 5.5 using Package Autodiscovery. | ||
|
||
Publish vendor files to create your `config/zmq.php` file | ||
|
||
```bash | ||
$ php artisan vendor:publish --provider="Pelim\ZmqServiceProvider" | ||
``` | ||
|
||
Update your `config/zmq.php` with the appropriate socket details. | ||
|
||
Set `BROADCASTING_DRIVER=zmq` in your `.env` and add the following ZeroMQ connection settings to your `config/broadcasting.php`: | ||
|
||
```php | ||
'connections' => [ | ||
'zmq' => [ | ||
'driver' => 'zmq', | ||
], | ||
] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,31 @@ | ||
{ | ||
"name": "pelim/laravel-zmq", | ||
"description": "zmq support for Laravel5", | ||
"description": "A ZeroMQ broadcast driver for Laravel 5", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "pelim", | ||
"email": "[email protected]" | ||
} | ||
], | ||
|
||
"require": { | ||
"ext-zmq": "*", | ||
"illuminate/broadcasting": "5.2.*", | ||
"illuminate/contracts": "5.2.*" | ||
"illuminate/broadcasting": "5.5.*", | ||
"illuminate/contracts": "5.5.*", | ||
"illuminate/http": "5.5.*" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Pelim\\LaravelZmq\\": "src/" | ||
} | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": false | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"Pelim\\LaravelZmq\\ZmqServiceProvider" | ||
] | ||
} | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
<?php | ||
|
||
|
||
return [ | ||
|
||
'default' => 'publish', | ||
|
||
'connections' => [ | ||
|
||
'publish' => [ | ||
'dsn' => 'tcp://127.0.0.1:5555', | ||
'method' => \ZMQ::SOCKET_PUB, | ||
], | ||
|
||
'subscribe' => [ | ||
'dsn' => 'tcp://0.0.0.0:5555', | ||
'method' => \ZMQ::SOCKET_SUB, | ||
], | ||
|
||
] | ||
]; | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.