make memory repository the default using a binding

This commit is contained in:
Namoshek 2019-09-17 20:01:49 +02:00
parent 77c2648964
commit aff8b8d1a1
1 changed files with 4 additions and 0 deletions

View File

@ -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);
}
}