Skip to content

Commit

Permalink
Update Provider
Browse files Browse the repository at this point in the history
  • Loading branch information
RamiiYoussef committed Feb 27, 2024
1 parent 90bccc6 commit 16d7b00
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 34 deletions.
33 changes: 0 additions & 33 deletions src/KafkaServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,8 @@ class KafkaServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->publishes([
__DIR__ . '/../config/kafka.php' => config_path('kafka.php'),
], 'laravel-kafka-config');

$this->app['queue']->addConnector('kafka', function () {
return new KafkaConnector();
});
}

/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->registerConfig();
}


/**
* Setup the config.
*
* @return void
*/
public function registerConfig()
{
$this->mergeConfigFrom(
__DIR__ . '/../config/queue.php',
'queue.connections.kafka'
);

$this->mergeConfigFrom(
__DIR__ . '/../config/kafka.php',
'kafka'
);
}
}
2 changes: 1 addition & 1 deletion src/KafkaServiceProviderBK.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use RamiiYoussef\Kafka\Console\ConsumeCommand;
use RamiiYoussef\Kafka\Console\RestartCommand;

class ServiceProvider extends BaseServiceProvider implements DeferrableProvider
class KafkaServiceProviderBK extends BaseServiceProvider implements DeferrableProvider
{
/**
* Is sig enabled
Expand Down

0 comments on commit 16d7b00

Please sign in to comment.