Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
10 / 10 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| SqloutServiceProvider | |
100.00% |
10 / 10 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
1 / 1 |
| boot | |
100.00% |
10 / 10 |
|
100.00% |
1 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Baril\Sqlout; |
| 4 | |
| 5 | use Baril\Sqlout\Migrations\MigrateMakeCommand; |
| 6 | use Illuminate\Support\ServiceProvider; |
| 7 | use Laravel\Scout\EngineManager; |
| 8 | |
| 9 | class SqloutServiceProvider extends ServiceProvider |
| 10 | { |
| 11 | /** |
| 12 | * Register the application's scout macros. |
| 13 | * |
| 14 | * @return void |
| 15 | */ |
| 16 | public function boot() |
| 17 | { |
| 18 | app(EngineManager::class)->extend('sqlout', function () { |
| 19 | return new Engine(); |
| 20 | }); |
| 21 | |
| 22 | if ($this->app->runningInConsole()) { |
| 23 | $this->commands([ |
| 24 | MigrateMakeCommand::class, |
| 25 | ]); |
| 26 | } |
| 27 | $this->publishes([ |
| 28 | __DIR__ . '/../config/scout.php' => $this->app['path.config'] . DIRECTORY_SEPARATOR . 'scout.php', |
| 29 | ]); |
| 30 | } |
| 31 | } |