$options */ trait UserAdjustments { /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'phone_verified_at' => 'datetime', 'password_must_be_changed' => 'bool', 'must_fill_profile' => 'bool', 'options' => 'array', 'custom_fields' => 'array', 'password' => 'hashed', ]; } /** * Get option from options */ public function getOption(string $option): null|int|string { return $this->options && array_key_exists($option, $this->options) ? $this->options[$option] : ''; } }