*/ protected $allowedFields = [ 'telegram_user_id', 'username', 'first_name', 'last_name', 'is_verified', 'parent_id', ]; /** * Attributes that should be cast to specific types * * @var array */ protected $casts = [ 'id' => 'integer', 'telegram_user_id' => 'integer', 'parent_id' => 'integer', 'is_verified' => 'boolean', 'created_at' => 'datetime', 'updated_at' => 'datetime', ]; /** * Check if account is verified * * @return bool */ public function isVerified(): bool { return (bool) $this->attributes['is_verified']; } }