| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function register() |
||
| 16 | { |
||
| 17 | // A single instance per request is enough |
||
| 18 | $this->app->singleton(RabbitMQManager::class, function (Application $app) { |
||
| 19 | return new RabbitMQManager($app); |
||
| 20 | }); |
||
| 21 | |||
| 22 | // Create a substitute binding |
||
| 23 | $this->app->bind('rabbitmq', function (Application $app) { |
||
| 24 | return $app->make(RabbitMQManager::class); |
||
| 25 | }); |
||
| 26 | |||
| 27 | $this->publishes([ |
||
| 28 | __DIR__ . '/../config/rabbitmq.php' => config_path('rabbitmq.php'), |
||
| 29 | ], 'config'); |
||
| 30 | } |
||
| 31 | |||
| 42 |