File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ $ composer require codedge/laravel-selfupdater
24
24
25
25
This adds the _ codedge/laravel-selfupdater_ package to your ` composer.json ` and downloads the project.
26
26
27
+ ## Register the package
28
+
29
+ Since Laravel 5.5 auto-discovery can be used to register packages - this is supported by this package.
30
+ So if you run Laravel >=5.5 the steps ` [1] ` and ` [2] ` are not needed.
31
+
27
32
You need to include the service provider in your ` config/app.php ` ` [1] ` and optionally the _ facade_ ` [2] ` :
28
33
``` php
29
34
// config/app.php
@@ -43,12 +48,12 @@ return [
43
48
'aliases' => [
44
49
// ...
45
50
46
- 'Updater' => Codedge\Updater\UpdaterManager ::class, // [2]
51
+ 'Updater' => Codedge\Updater\UpdaterFacade ::class, // [2]
47
52
48
53
]
49
54
```
50
55
51
- Additionally add the listener to your ` app/Providers/EventServiceProvider.php ` :
56
+ Additionally add the listener to your ` app/Providers/EventServiceProvider.php ` ` [3] ` :
52
57
53
58
``` php
54
59
// app/Providers/EventServiceProvider.php
@@ -63,10 +68,10 @@ protected $listen = [
63
68
64
69
\Codedge\Updater\Events\UpdateAvailable::class => [
65
70
\Codedge\Updater\Listeners\SendUpdateAvailableNotification::class
66
- ],
71
+ ], // [3]
67
72
\Codedge\Updater\Events\UpdateSucceeded::class => [
68
73
\Codedge\Updater\Listeners\SendUpdateSucceededNotification::class
69
- ],
74
+ ], // [3]
70
75
71
76
];
72
77
Original file line number Diff line number Diff line change 37
37
"config" : {
38
38
"sort-packages" : true
39
39
},
40
+ "extra" : {
41
+ "laravel" : {
42
+ "providers" : [
43
+ " Codedge\\ Updater\\ UpdaterServiceProvider"
44
+ ],
45
+ "aliases" : {
46
+ "Updater" : " Codedge\\ Updater\\ UpdaterFacade"
47
+ }
48
+ }
49
+ },
40
50
"require" : {
41
51
"php" : " >=7.1" ,
42
52
"ext-zip" : " *" ,
You can’t perform that action at this time.
0 commit comments