Closed Surt closed 11 years ago
I don't get one you mean... we're setting the event dispatcher:
Eloquent\Model::setEventDispatcher($this->config['events']);
It seems to be
/**
* Create a new Eloquent model instance.
*
* @param array $attributes
* @return void
*/
public function __construct(array $attributes = array())
{
if ( ! isset(static::$booted[get_class($this)]))
{
static::boot();
static::$booted[get_class($this)] = true;
}
$this->fill($attributes);
}
static::$booted does not exists on standalone capsule installation? I don't know, just, with capsule my events defined on the boot method inside a model does not work.
Hi Taylor,
after yesterday fix for standalone database lib, the events still don't fire. I can't follow the entire architecture, but I see the Model not getting the dispatcher from the DatabaseManager at all, so, even if you create one on the config and assign it to Capsule (or letting the getEmptyConfig create it), the Model still don't have it, since is not using the DatabaseManager one.