ipunkt/laravel-indexer-client
laravel-indexer-client
A php client for the laravel-indexer-service.
Installation
composer require ipunkt/laravel-indexer-client
If you need a < php7 release use the 1.* version.
Binding in Laravel
In any ServiceProvider do the following:
public function register()
{
$this->app->bind(IndexerClient::class, function () {
$host = config('indexer.service');
$token = config('indexer.token');
try {
$httpClient = new Client();
$client = new IndexerClient($host, $httpClient, $token);
return $client;
} catch (Exception $exception) {
throw new \RuntimeException('IndexerClient can not be instantiated.', 0, $exception);
}
});
}
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
631,580,251
9,707
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
404,034,618
608
nunomaduro/collision
Cli error handling for console/command-line PHP applications.
384,821,166
4,658