File tree Expand file tree Collapse file tree 1 file changed +5
-25
lines changed
src/Illuminate/Foundation/Support/Providers Expand file tree Collapse file tree 1 file changed +5
-25
lines changed Original file line number Diff line number Diff line change @@ -16,14 +16,14 @@ 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
25
/**
26
- * The observers mapping for the application models .
26
+ * The model observers to register .
27
27
*
28
28
* @var array
29
29
*/
@@ -49,7 +49,9 @@ public function register()
49
49
Event::subscribe ($ subscriber );
50
50
}
51
51
52
- $ this ->registerObservers ();
52
+ foreach ($ this ->observers as $ model => $ observers ) {
53
+ $ model ::observe ($ observers );
54
+ }
53
55
});
54
56
}
55
57
@@ -154,26 +156,4 @@ protected function eventDiscoveryBasePath()
154
156
{
155
157
return base_path ();
156
158
}
157
-
158
- /**
159
- * Get the observers defined on the provider.
160
- *
161
- * @return array
162
- */
163
- public function observers ()
164
- {
165
- return $ this ->observers ;
166
- }
167
-
168
- /**
169
- * Register the application model's observers.
170
- *
171
- * @return void
172
- */
173
- public function registerObservers ()
174
- {
175
- foreach ($ this ->observers () as $ model => $ observers ) {
176
- $ model ::observe ($ observers );
177
- }
178
- }
179
159
}
You can’t perform that action at this time.
0 commit comments