Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Sep 2, 2017
1 parent c6428d9 commit 84291a6
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/Illuminate/Database/Eloquent/Concerns/HasEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ public function getObservableEvents()
{
return array_merge(
[
'creating', 'created', 'updating', 'updated',
'deleting', 'deleted', 'saving', 'saved',
'restoring', 'restored', 'retrieved',
'retrieved', 'creating', 'created', 'updating',
'updated', 'deleting', 'deleted', 'saving',
'saved', 'restoring', 'restored',
],
$this->observables
);
Expand Down Expand Up @@ -186,6 +186,17 @@ protected function filterModelEventResults($result)
return $result;
}

/**
* Register a retrieved model event with the dispatcher.
*
* @param \Closure|string $callback
* @return void
*/
public static function retrieved($callback)
{
static::registerModelEvent('retrieved', $callback);
}

/**
* Register a saving model event with the dispatcher.
*
Expand Down Expand Up @@ -274,17 +285,6 @@ public static function deleted($callback)
static::registerModelEvent('deleted', $callback);
}

/**
* Register a retrieved model event with the dispatcher.
*
* @param \Closure|string $callback
* @return void
*/
public static function retrieved($callback)
{
static::registerModelEvent('retrieved', $callback);
}

/**
* Remove all of the event listeners for the model.
*
Expand Down

0 comments on commit 84291a6

Please sign in to comment.