Skip to content

Commit

Permalink
Add option to easily extend MondayBoard in services
Browse files Browse the repository at this point in the history
  • Loading branch information
proclame committed Jan 2, 2021
1 parent 016b81e commit cccab54
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/MondayServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ public function register()
$this->mergeConfigFrom(__DIR__.'/../config/monday.php', 'monday');

$this->app->bind('monday', function ($app) {
$mondayBoard = new MondayBoard();
if(class_exists('\App\Services\MondayBoard')){
$mondayBoard = new \App\Services\MondayBoard();
} else {
$mondayBoard = new MondayBoard();
}
$mondayBoard->setToken(new Token(config('monday.monday_token')));

return $mondayBoard;
Expand Down

0 comments on commit cccab54

Please sign in to comment.