Permalink
Browse files

Merge pull request #2653 from bencorlett/patch-1

Added "booting" and "booted" events to a model
  • Loading branch information...
taylorotwell committed Nov 9, 2013
2 parents 8c60cdf + 8abde78 commit 2dfb3831d62f4689b9e234a83af46551df273609
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/Illuminate/Database/Eloquent/Model.php
@@ -242,8 +242,12 @@ public function __construct(array $attributes = array())
if ( ! isset(static::$booted[get_class($this)]))
{
static::$booted[get_class($this)] = true;
$this->fireModelEvent('booting', false);
static::boot();
$this->fireModelEvent('booted', false);
}
$this->syncOriginal();

0 comments on commit 2dfb383

Please sign in to comment.