Skip to content

Commit 831b374

Browse files
committed
Remove "boot" Function from Service Provider
1 parent 5167ee6 commit 831b374

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/DatabaseRepositoryServiceProvider.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,15 @@
2020
class DatabaseRepositoryServiceProvider extends ServiceProvider
2121
{
2222
/**
23-
* Bootstrap the application events.
23+
* Register the service provider.
2424
*/
25-
public function boot()
25+
public function register(): void
26+
{
27+
$this->offerPublishing();
28+
$this->registerCommands();
29+
}
30+
31+
public function offerPublishing(): void
2632
{
2733
if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {
2834
$this->publishes([
@@ -33,14 +39,6 @@ public function boot()
3339
}
3440
}
3541

36-
/**
37-
* Register the service provider.
38-
*/
39-
public function register(): void
40-
{
41-
$this->registerCommands();
42-
}
43-
4442
/**
4543
* Register custom commands.
4644
*/

0 commit comments

Comments
 (0)