Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions bootstrap/app.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once __DIR__.'/../vendor/autoload.php';
require_once __DIR__ . '/../vendor/autoload.php';

(new Laravel\Lumen\Bootstrap\LoadEnvironmentVariables(
dirname(__DIR__)
Expand Down Expand Up @@ -60,6 +60,7 @@
*/

$app->configure('app');
$app->configure('scout');

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -95,6 +96,9 @@
// $app->register(App\Providers\AuthServiceProvider::class);
// $app->register(App\Providers\EventServiceProvider::class);

$app->register(Laravel\Scout\ScoutServiceProvider::class);
$app->register(ScoutEngines\Postgres\PostgresEngineServiceProvider::class);

/*
|--------------------------------------------------------------------------
| Load The Application Routes
Expand All @@ -109,7 +113,7 @@
$app->router->group([
'namespace' => 'App\Http\Controllers',
], function ($router) {
require __DIR__.'/../routes/web.php';
require __DIR__ . '/../routes/web.php';
});

return $app;
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"type": "project",
"require": {
"php": "^7.3|^8.0",
"laravel/lumen-framework": "^8.0"
"laravel/lumen-framework": "^8.0",
"laravel/scout": "^8.4",
"pmatseykanets/laravel-scout-postgres": "^7.2"
},
"require-dev": {
"fzaninotto/faker": "^1.9.1",
Expand Down
137 changes: 136 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions config/scout.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

return [
'connection' => env('DB_CONNECTION', 'pgsql'),
'maintain_index' => true,
'config' => 'english',
'search_using' => 'tsquery',
'driver' => env('SCOUT_DRIVER', 'pgsql'),
'prefix' => env('SCOUT_PREFIX', ''),
'queue' => false,
'pgsql' => [
'connection' => 'pgsql',
'maintain_index' => true,
'config' => 'english',
],
];