Hashable
 trait Winter\Storm\Database\Traits\HashableProperties
            
            
            
                protected
            
            
            $originalHashableValues
            
                :
                                                            array
                                                                        
                        = []
                    
                            
        
        
        List of original attribute values before they were hashed.
Methods
            
            
            
                public
            
                        
            addHashable (array | string | null $attributes = null)
                            : $this
                    
        
        Adds an attribute to the hashable attributes list
Parameters
                | Property | Type | Description | 
|---|---|---|
| $attributes | array | string | null | array | string | null | 
Returns
            $this
                public addHashableAttribute ($attribute)
Parameters
                | Property | Type | Description | 
|---|---|---|
| $attribute | mixed | mixed | 
Returns
            mixed
                public static bootHashable () : void
Boot the hashable trait for a model.
Returns
            void
                public checkHashValue (string $key, string $value) : bool
Checks if the supplied plain value matches the stored hash value.
Parameters
                | Property | Type | Description | 
|---|---|---|
| $key | string | string Attribute to check | 
| $value | string | string Value to check | 
Returns
            bool
                public getHashableAttributes () : array
Returns a collection of fields that will be hashed.
Returns
            array
                public getOriginalHashValue ($attribute) : mixed
Returns the original values of any hashed attributes.
Parameters
                | Property | Type | Description | 
|---|---|---|
| $attribute | mixed | mixed | 
Returns
            mixed
                public getOriginalHashValues () : array
Returns the original values of any hashed attributes.
Returns
            array
                public makeHashValue (string $key, string $value) : string
Hashes an attribute value and saves it in the original locker.
Parameters
                | Property | Type | Description | 
|---|---|---|
| $key | string | string Attribute | 
| $value | string | string Value to hash | 
Returns
            string
                Hashed value
Used by
            
            ← Previous page
            Winter\Storm\Database\Traits\HasSortableRelations
        
                
            Next page →
            Winter\Storm\Database\Traits\NestedTree
        
    
    Copyright © 2025 Winter CMS