public function __construct($properties = []) { if (!empty($properties)) { parent::__construct($properties); $this->node->setProperty('token', str_random(40)); $this->node->setProperty('password', Hash::make($properties['password'])); $this->node->save(); } }
public function __construct(array $attributes = []) { $this->attributes = array_merge($this->attributes, ['applications' => []]); parent::__construct($attributes); }