Skip to content

Commit aff8b8d

Browse files
committed
make memory repository the default using a binding
1 parent 77c2648 commit aff8b8d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/MqttClientServiceProvider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
use Illuminate\Contracts\Foundation\Application;
66
use Illuminate\Support\ServiceProvider;
7+
use PhpMqtt\Client\Contracts\Repository;
8+
use PhpMqtt\Client\Repositories\MemoryRepository;
79

810
/**
911
* Registers the php-mqtt/laravel-client within the application.
@@ -50,5 +52,7 @@ protected function registerServices(): void
5052
$config = $app->make('config')->get('mqtt-client', []);
5153
return new ConnectionManager($app, $config);
5254
});
55+
56+
$this->app->bind(Repository::class, MemoryRepository::class);
5357
}
5458
}

0 commit comments

Comments
 (0)