Skip to content

Commit

Permalink
Merge pull request #79 from DrowningElysium/patch-1
Browse files Browse the repository at this point in the history
Make the factory Injectable
  • Loading branch information
willvincent authored Mar 8, 2022
2 parents 18abbf5 + 5fd0b00 commit ac46ca2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/FeedsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function boot()
*/
public function register()
{
$this->app->singleton('Feeds', function () {
$this->app->singleton(FeedsFactory::class, function () {
$config = config('feeds');

if (! $config) {
Expand All @@ -39,6 +39,7 @@ public function register()

return new FeedsFactory($config);
});
$this->app->alias(FeedsFactory::class, 'Feeds');
}

/**
Expand Down

0 comments on commit ac46ca2

Please sign in to comment.