Skip to content

Commit cccab54

Browse files
committed
Add option to easily extend MondayBoard in services
1 parent 016b81e commit cccab54

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/MondayServiceProvider.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ public function register()
2222
$this->mergeConfigFrom(__DIR__.'/../config/monday.php', 'monday');
2323

2424
$this->app->bind('monday', function ($app) {
25-
$mondayBoard = new MondayBoard();
25+
if(class_exists('\App\Services\MondayBoard')){
26+
$mondayBoard = new \App\Services\MondayBoard();
27+
} else {
28+
$mondayBoard = new MondayBoard();
29+
}
2630
$mondayBoard->setToken(new Token(config('monday.monday_token')));
2731

2832
return $mondayBoard;

0 commit comments

Comments
 (0)