Skip to content

Commit

Permalink
Merge pull request #17 from hulkur/auto-discover
Browse files Browse the repository at this point in the history
Add package auto-discovery
  • Loading branch information
junaidnasir authored Apr 24, 2019
2 parents d1784c8 + 99d9dd1 commit 6d079f6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
10 changes: 10 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,15 @@
},
"require-dev": {
"phpunit/phpunit": "^5.2"
},
"extra": {
"laravel": {
"providers": [
"Junaidnasir\\Larainvite\\LaraInviteServiceProvider"
],
"aliases": {
"Invite": "Junaidnasir\\Larainvite\\Facades\\Invite"
}
}
}
}
6 changes: 5 additions & 1 deletion src/LaraInviteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@ public function boot()
*/
public function register()
{

$this->mergeConfigFrom(__DIR__.'/Config/larainvite.php', 'larainvite');
$this->app->singleton('invite', function ($app) {
$laravelImplementation = new \Junaidnasir\Larainvite\LaraInvite();
return new \Junaidnasir\Larainvite\UserInvitation($laravelImplementation);
});
}

public function provides()
{
return ['invite'];
}
}

0 comments on commit 6d079f6

Please sign in to comment.