File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/Illuminate/Foundation/Support/Providers Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -16,12 +16,19 @@ class EventServiceProvider extends ServiceProvider
16
16
protected $ listen = [];
17
17
18
18
/**
19
- * The subscriber classes to register.
19
+ * The subscribers to register.
20
20
*
21
21
* @var array
22
22
*/
23
23
protected $ subscribe = [];
24
24
25
+ /**
26
+ * The model observers to register.
27
+ *
28
+ * @var array
29
+ */
30
+ protected $ observers = [];
31
+
25
32
/**
26
33
* Register the application's event listeners.
27
34
*
@@ -41,6 +48,10 @@ public function register()
41
48
foreach ($ this ->subscribe as $ subscriber ) {
42
49
Event::subscribe ($ subscriber );
43
50
}
51
+
52
+ foreach ($ this ->observers as $ model => $ observers ) {
53
+ $ model ::observe ($ observers );
54
+ }
44
55
});
45
56
}
46
57
You can’t perform that action at this time.
0 commit comments