Skip to content

Commit e7237f9

Browse files
committed
Merge branch 'punyflash-master'
2 parents 3ad64c5 + 102df66 commit e7237f9

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,19 @@ class EventServiceProvider extends ServiceProvider
1616
protected $listen = [];
1717

1818
/**
19-
* The subscriber classes to register.
19+
* The subscribers to register.
2020
*
2121
* @var array
2222
*/
2323
protected $subscribe = [];
2424

25+
/**
26+
* The model observers to register.
27+
*
28+
* @var array
29+
*/
30+
protected $observers = [];
31+
2532
/**
2633
* Register the application's event listeners.
2734
*
@@ -41,6 +48,10 @@ public function register()
4148
foreach ($this->subscribe as $subscriber) {
4249
Event::subscribe($subscriber);
4350
}
51+
52+
foreach ($this->observers as $model => $observers) {
53+
$model::observe($observers);
54+
}
4455
});
4556
}
4657

0 commit comments

Comments
 (0)