| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function register() |
||
| 27 | { |
||
| 28 | // Automatically apply the package configuration |
||
| 29 | $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'firebase'); |
||
| 30 | |||
| 31 | $this->app->singleton(FirebaseFactory::class, function () { |
||
| 32 | $config = config('firebase'); |
||
| 33 | $this->guardAgainstInvalidConfiguration($config); |
||
| 34 | |||
| 35 | $serviceAccount = ServiceAccount::fromJsonFile( |
||
| 36 | $config['service_account_json'] |
||
| 37 | ); |
||
| 38 | |||
| 39 | return FirebaseFactory::create($serviceAccount, $config); |
||
| 40 | }); |
||
| 41 | } |
||
| 42 | |||
| 57 |