File tree 1 file changed +19
-10
lines changed
src/Commands/stubs/scaffold
1 file changed +19
-10
lines changed Original file line number Diff line number Diff line change @@ -7,44 +7,53 @@ use Illuminate\Support\ServiceProvider as Provider;
7
7
8
8
class $NAME$ extends Provider
9
9
{
10
+ /**
11
+ * Register the service provider.
12
+ *
13
+ * @return void
14
+ */
15
+ public function register()
16
+ {
17
+ $this->loadConfig();
18
+ $this->loadRoutes();
19
+ }
20
+
10
21
/**
11
22
* Boot the application events.
12
23
*
13
24
* @return void
14
25
*/
15
26
public function boot()
16
27
{
17
- $this->loadConfig ();
28
+ $this->publishConfig ();
18
29
$this->loadViews();
19
30
$this->loadViewComponents();
20
31
$this->loadTranslations();
21
32
$this->loadMigrations();
22
33
}
23
34
24
35
/**
25
- * Register the service provider .
36
+ * Load config .
26
37
*
27
38
* @return void
28
39
*/
29
- public function register ()
40
+ protected function loadConfig ()
30
41
{
31
- $this->loadRoutes();
42
+ $this->mergeConfigFrom(
43
+ __DIR__ . '/../$PATH_CONFIG$/config.php', '$ALIAS$'
44
+ );
32
45
}
33
46
34
47
/**
35
- * Load config.
48
+ * Publish config.
36
49
*
37
50
* @return void
38
51
*/
39
- protected function loadConfig ()
52
+ protected function publishConfig ()
40
53
{
41
54
$this->publishes([
42
55
__DIR__ . '/../$PATH_CONFIG$/config.php' => config_path('$ALIAS$.php'),
43
56
], 'config');
44
-
45
- $this->mergeConfigFrom(
46
- __DIR__ . '/../$PATH_CONFIG$/config.php', '$ALIAS$'
47
- );
48
57
}
49
58
50
59
/**
You can’t perform that action at this time.
0 commit comments