Skip to content

Commit 2ee52ed

Browse files
committed
Add Config Registration in "boot"
1 parent 4c53728 commit 2ee52ed

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

src/DatabaseRepositoryServiceProvider.php

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,37 +19,30 @@
1919
*/
2020
class DatabaseRepositoryServiceProvider extends ServiceProvider
2121
{
22-
/**
23-
* The package configuration file.
24-
*/
25-
const CONFIG_FILE = 'repository.php';
26-
2722
/**
2823
* Bootstrap the application events.
2924
*/
30-
// public function boot()
31-
// {
32-
//
33-
//
34-
// $this->register();
35-
// }
36-
37-
/**
38-
* Register the service provider.
39-
*/
40-
public function register(): void
25+
public function boot()
4126
{
4227
if ($this->app instanceof LaravelApplication && $this->app->runningInConsole()) {
4328
$this->publishes([
44-
__DIR__.'/Config/' . self::CONFIG_FILE => config_path(self::CONFIG_FILE),
45-
], 'config');
29+
__DIR__.'/Config/repository.php' => config_path('repository.php'),
30+
], 'repository-config');
4631
} elseif ($this->app instanceof LumenApplication) {
4732
$this->app->configure('repository');
4833
}
4934

5035
$this->registerCommand();
5136
}
5237

38+
/**
39+
* Register the service provider.
40+
*/
41+
public function register(): void
42+
{
43+
44+
}
45+
5346
/**
5447
* Register custom commands.
5548
*/

0 commit comments

Comments
 (0)