FleetCart/Modules/Core/Providers/SearchEngineServiceProvider.php

35 lines
861 B
PHP
Raw Normal View History

2023-06-11 12:14:03 +00:00
<?php
namespace Modules\Core\Providers;
use Illuminate\Support\ServiceProvider;
class SearchEngineServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
if (! config('app.installed')) {
return;
}
$this->app['config']->set([
'scout' => [
'driver' => setting('search_engine', 'mysql'),
'algolia' => [
'id' => setting('algolia_app_id'),
'secret' => setting('algolia_secret'),
],
'meilisearch' => [
'host' => setting('meilisearch_host'),
'key' => setting('meilisearch_key'),
],
],
]);
}
}