Skip to content

Commit d162b9b

Browse files
authored
Merge pull request #16 from ibrahim-sakr/update-service-provider
update service providers
2 parents 138fae9 + dc870ac commit d162b9b

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

src/LaravelBatchServiceProvider.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
namespace Mavinoo\LaravelBatch;
44

55
use Illuminate\Support\ServiceProvider;
6-
6+
use Illuminate\Database\DatabaseManager;
77

88
class LaravelBatchServiceProvider extends ServiceProvider
99
{
10+
/**
11+
* @updateedBy Ibrahim Sakr <ebrahimes@gmail.com>
12+
*/
1013
public function register()
1114
{
12-
$this->app->bind('Batch', function (){
13-
return new Batch;
15+
$this->app->bind(Batch::class, function ($app){
16+
return new Batch($app->make(DatabaseManager::class));
1417
});
1518
}
16-
}
19+
}

0 commit comments

Comments
 (0)