Use with Lumen
jake142 opened this issue · 3 comments
jake142 commented
I'd love to use this package with Laravel Lumen. When running the migration I get:
lumen.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined function ScoutEngines\Postgres\resolve() in customer/Api/vendor/pmatseykanets/laravel-scout-postgres/src/PostgresEngineServiceProvider.php:12
If i changed to this I got the migrate working:
$this->app->configure('scout');
$this->app->singleton(EngineManager::class, function ($app) {
return (new EngineManager($app))->extend('pgsql', function ($app) {
return new PostgresEngine($this->app['db'], config('scout.pgsql', []));
});
});
Is it possible to use with Lumen?
pmatseykanets commented
scramatte commented
Hi,
I'm trying to use your engine with lumen 5.7 . but I got the following error:
In Container.php line 779:
Class path.config does not exist
Any idea what occurs here?
Regards
scramatte commented
I believe that you need to add the following line in bootstrap/app.php
$app->instance('path.config', app()->basePath() . DIRECTORY_SEPARATOR . 'config');