| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 30 | protected function registerConnectionServices() |
||
| 31 | { |
||
| 32 | // The connection factory is used to create the actual connection instances on |
||
| 33 | // the database. We will inject the factory into the manager so that it may |
||
| 34 | // make the connections while they are actually needed and not of before. |
||
| 35 | $this->getContainer()->share('db.factory', ConnectionFactory::class); |
||
| 36 | |||
| 37 | // The database manager is used to resolve various connections, since multiple |
||
| 38 | // connections might be managed. It also implements the connection resolver |
||
| 39 | // interface which may be used by other components requiring connections. |
||
| 40 | $this->getContainer()->share('db', DatabaseManager::class); |
||
| 41 | |||
| 42 | $this->getContainer()->share('db.connection', function () { |
||
| 43 | return app('db')->connection(); |
||
| 44 | }); |
||
| 55 |