make memory repository the default using a binding
This commit is contained in:
parent
77c2648964
commit
aff8b8d1a1
|
@ -4,6 +4,8 @@ namespace PhpMqtt\Client;
|
|||
|
||||
use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use PhpMqtt\Client\Contracts\Repository;
|
||||
use PhpMqtt\Client\Repositories\MemoryRepository;
|
||||
|
||||
/**
|
||||
* Registers the php-mqtt/laravel-client within the application.
|
||||
|
@ -50,5 +52,7 @@ class MqttClientServiceProvider extends ServiceProvider
|
|||
$config = $app->make('config')->get('mqtt-client', []);
|
||||
return new ConnectionManager($app, $config);
|
||||
});
|
||||
|
||||
$this->app->bind(Repository::class, MemoryRepository::class);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue