File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/Illuminate/Foundation/Console Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -227,18 +227,19 @@ protected function getRelations($model)
227
227
/**
228
228
* Get the Observers watching this model.
229
229
*
230
+ * @param \Illuminate\Database\Eloquent\Model $model
230
231
* @return Illuminate\Support\Collection
231
232
*/
232
233
protected function getObservers ($ model )
233
234
{
234
235
$ listeners = $ this ->getLaravel ()->make ('events ' )->getRawListeners ();
235
236
236
- // Distill down to Eloquent observers relevant to this model.
237
+ // Get the Eloquent observers for this model.. .
237
238
$ listeners = array_filter ($ listeners , function ($ v , $ key ) use ($ model ) {
238
239
return Str::startsWith ($ key , 'eloquent. ' ) && Str::endsWith ($ key , $ model ::class);
239
240
}, ARRAY_FILTER_USE_BOTH );
240
241
241
- // Format as Eloquent verb => Observer methods
242
+ // Format listeners Eloquent verb => Observer methods...
242
243
$ extractVerb = function ($ key ) {
243
244
preg_match ('/eloquent.([a-zA-Z]+)\: / ' , $ key , $ matches );
244
245
return $ matches [1 ] ?? '? ' ;
You can’t perform that action at this time.
0 commit comments