| Conditions | 2 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | public function register() |
||
| 35 | { |
||
| 36 | $configPath = __DIR__.'/../config/feed.php'; |
||
| 37 | $this->mergeConfigFrom($configPath, 'feed'); |
||
| 38 | |||
| 39 | $this->app->singleton( |
||
| 40 | 'feed', |
||
| 41 | function () { |
||
| 42 | $config = config('feed'); |
||
| 43 | |||
| 44 | if (!$config) { |
||
| 45 | throw new \RuntimeException( |
||
| 46 | 'Configuration not available. Run `php artisan vendor:publish ' |
||
| 47 | .'--provider="ejdelmonico\LaravelRSSFeed\LaravelRSSFeedServiceProvider" --tag=config`' |
||
| 48 | ); |
||
| 49 | } |
||
| 50 | |||
| 51 | return new FeedFactory($config); |
||
| 52 | } |
||
| 53 | ); |
||
| 54 | |||
| 55 | $this->app->alias('feed', FeedFactory::class); |
||
| 56 | } |
||
| 57 | |||
| 78 |