FleetCart/Modules/Core/Providers/SearchEngineServiceProvider.php
2023-06-11 13:14:03 +01:00

35 lines
861 B
PHP

<?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'),
],
],
]);
}
}