File tree Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Expand file tree Collapse file tree 2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 5
5
"license" : " MIT" ,
6
6
"require" : {
7
7
"php" : " >=7.1" ,
8
- "laravel/framework " : " 5.5.*|5.6.*|5.7.*|5.8. *" ,
9
- "ext-json " : " *"
8
+ "ext-json " : " *" ,
9
+ "illuminate/support " : " 5.8. *"
10
10
},
11
11
"require-dev" : {
12
12
"orchestra/testbench" : " ~3.0"
Original file line number Diff line number Diff line change 4
4
5
5
use Coderello \SharedData \SharedData ;
6
6
use Illuminate \Support \ServiceProvider ;
7
+ use Illuminate \Contracts \Support \DeferrableProvider ;
7
8
8
- class SharedDataServiceProvider extends ServiceProvider
9
+ class SharedDataServiceProvider extends ServiceProvider implements DeferrableProvider
9
10
{
10
11
/**
11
- * Bootstrap any application services .
12
+ * Bootstrap shared data service .
12
13
*
13
14
* @return void
14
15
*/
15
16
public function boot ()
16
17
{
18
+ if (! $ this ->app ->runningInConsole ()) {
19
+ return ;
20
+ }
21
+
17
22
$ this ->publishes ([
18
23
__DIR__ .'/../../config/shared-data.php ' => config_path ('shared-data.php ' ),
19
24
], 'shared-data-config ' );
20
25
}
21
26
22
27
/**
23
- * Register any application services.
24
- *
25
- * @return void
28
+ * {@inheritdoc}
26
29
*/
27
30
public function register ()
28
31
{
@@ -35,4 +38,14 @@ public function register()
35
38
return new SharedData ($ this ->app ['config ' ]['shared-data ' ]);
36
39
});
37
40
}
41
+
42
+ /**
43
+ * {@inheritdoc}
44
+ */
45
+ public function provides ()
46
+ {
47
+ return [
48
+ SharedData::class,
49
+ ];
50
+ }
38
51
}
You can’t perform that action at this time.
0 commit comments