tethys/app/Providers/SolariumServiceProvider.php

43 lines
1018 B
PHP
Raw Normal View History

2018-08-06 12:30:51 +00:00
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Solarium\Client;
class SolariumServiceProvider extends ServiceProvider
{
protected $defer = true;
/**
* Register the application services.
*
* @return void
*/
public function register()
{
2018-11-08 16:47:27 +00:00
$this->app->bind(Client::class, function ($app) {
2018-08-06 12:30:51 +00:00
// $config = config('solarium');
$config = array(
'endpoint' => array(
'localhost' => array(
'host' => 'repository.geologie.ac.at',
'port' => '8983',
'path' => '/solr/',
'core' => 'rdr_data'
2018-08-06 12:30:51 +00:00
)
)
);
2018-08-06 12:30:51 +00:00
//return new Client($config);
return new Client($config);
2018-08-06 12:30:51 +00:00
//return new Client($app['config']['solarium']);
});
2018-08-06 12:30:51 +00:00
}
public function provides()
{
return [Client::class];
}
}