1
1
# laravel-pubsub
2
2
3
- A Pub-Sub abstraction for Laravel.
3
+ A Pub-Sub abstraction for Laravel and Lumen .
4
4
5
5
[ ![ Author] ( http://img.shields.io/badge/author-@superbalist-blue.svg?style=flat-square )] ( https://twitter.com/superbalist )
6
6
[ ![ Build Status] ( https://img.shields.io/travis/Superbalist/laravel-pubsub/master.svg?style=flat-square )] ( https://travis-ci.org/Superbalist/laravel-pubsub )
@@ -9,14 +9,16 @@ A Pub-Sub abstraction for Laravel.
9
9
[ ![ Packagist Version] ( https://img.shields.io/packagist/v/superbalist/laravel-pubsub.svg?style=flat-square )] ( https://packagist.org/packages/superbalist/laravel-pubsub )
10
10
[ ![ Total Downloads] ( https://img.shields.io/packagist/dt/superbalist/laravel-pubsub.svg?style=flat-square )] ( https://packagist.org/packages/superbalist/laravel-pubsub )
11
11
12
- This package is a wrapper bridging [ php-pubsub] ( https://github.com/Superbalist/php-pubsub ) into Laravel.
12
+ This package is a wrapper bridging [ php-pubsub] ( https://github.com/Superbalist/php-pubsub ) into Laravel and Lumen .
13
13
14
14
For ** Laravel 4** support, use the package https://github.com/Superbalist/laravel4-pubsub
15
15
16
16
Please note that ** Laravel 5.3** is only supported up until version 2.0.2.
17
17
18
18
2.0.3+ supports ** Laravel 5.4 and up** moving forward.
19
19
20
+ 3.0.1+ supports ** Lumen 5.5 and up** moving forward.
21
+
20
22
The following adapters are supported:
21
23
* Local
22
24
* /dev/null
@@ -25,7 +27,7 @@ The following adapters are supported:
25
27
* Google Cloud
26
28
* HTTP
27
29
28
- ## Installation
30
+ ## Laravel Installation
29
31
30
32
``` bash
31
33
composer require superbalist/laravel-pubsub
@@ -47,6 +49,40 @@ Register the facade in app.php
47
49
]
48
50
```
49
51
52
+ To customize the configuration file, publish the package configuration using Artisan.
53
+ ``` bash
54
+ php artisan vendor:publish --provider=" Superbalist\LaravelPubSub\PubSubServiceProvider"
55
+ ```
56
+
57
+ You can then edit the generated config at ` app/config/pubsub.php ` .
58
+
59
+ ## Lumen Installation
60
+
61
+ ``` bash
62
+ composer require superbalist/laravel-pubsub
63
+ ```
64
+
65
+ Register the service provider in app.php
66
+ ``` php
67
+ $app->register(Superbalist\LaravelPubSub\PubSubLumenServiceProvider::class);
68
+ ```
69
+
70
+ Register the facade in app.php
71
+ ``` php
72
+ if (!class_exists('PubSub')) {
73
+ class_alias('Superbalist\LaravelPubSub\PubSubFacade', 'PubSub');
74
+ }
75
+ ```
76
+
77
+ To customize the configuration file, publish the package configuration using Artisan.
78
+ ``` bash
79
+ cp vendor/superbalist/laravel-pubsub/config/pubsub.php config/pubsub.php
80
+ ```
81
+
82
+ You can then edit the generated config at ` config/pubsub.php ` .
83
+
84
+ ## Configuration
85
+
50
86
The package has a default configuration which uses the following environment variables.
51
87
```
52
88
PUBSUB_CONNECTION=redis
@@ -64,12 +100,7 @@ HTTP_PUBSUB_URI=null
64
100
HTTP_PUBSUB_SUBSCRIBE_CONNECTION=redis
65
101
```
66
102
67
- To customize the configuration file, publish the package configuration using Artisan.
68
- ``` bash
69
- php artisan vendor:publish --provider=" Superbalist\LaravelPubSub\PubSubServiceProvider"
70
- ```
71
103
72
- You can then edit the generated config at ` app/config/pubsub.php ` .
73
104
74
105
## Kafka Adapter Installation
75
106
0 commit comments