| Total Complexity | 4 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 10 | class PostgresRangeServiceProvider extends ServiceProvider |
||
| 11 | { |
||
| 12 | public function register(): void |
||
| 13 | { |
||
| 14 | $this->setCustomResolverForPgsql(); |
||
| 15 | $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'postgres-range'); |
||
| 16 | } |
||
| 17 | |||
| 18 | protected function setCustomResolverForPgsql(): void |
||
| 19 | { |
||
| 20 | Connection::resolverFor('pgsql', static function ($connection, $database, $prefix, $config) { |
||
| 21 | return new PostgresConnection($connection, $database, $prefix, $config); |
||
| 22 | }); |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Bootstrap the application services. |
||
| 27 | */ |
||
| 28 | public function boot(): void |
||
| 38 | } |
||
| 39 | } |
||
| 40 |