/** @inheritdoc */ public static function boot() { parent::boot(); // Ensure user is active upon creation static::creating(function (ServiceUser $model) { $model->active_ind = true; }); static::created(function (ServiceUser $model) { AppKey::createKeyForEntity($model, OwnerTypes::SERVICE_USER); }); }
/** * Boot method to wire in our events */ public static function boot() { parent::boot(); static::creating(function (User $model) { $model->checkStorageKey(); // Ensure user is active upon creation $model->active_ind = true; }); static::created(function (User $model) { AppKey::createKeyForEntity($model, OwnerTypes::USER); }); }