| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | protected function registerConnectionServices() |
||
| 27 | { |
||
| 28 | /** |
||
| 29 | * The db.factory container instance has been changed |
||
| 30 | * to implement custom query builder. |
||
| 31 | */ |
||
| 32 | $this->app->singleton('db.factory', function ($app) { |
||
| 33 | return new CustomConnectionFactory($app); |
||
| 34 | }); |
||
| 35 | |||
| 36 | $this->app->singleton('db', function ($app) { |
||
| 37 | return new DatabaseManager($app, $app['db.factory']); |
||
| 38 | }); |
||
| 39 | |||
| 40 | $this->app->bind('db.connection', function ($app) { |
||
| 41 | return $app['db']->connection(); |
||
| 42 | }); |
||
| 45 |