DeferredBinding
 trait Winter\Storm\Database\Traits\DeferredBindingProperties
public $sessionKey : string
A unique session key used for deferred binding.
Methods
            
            
            
                public
            
                        
            bindDeferred (string $relation, Illuminate\Database\Eloquent\Model $record, string $sessionKey, array $pivotData = [])
                            : Winter\Storm\Database\Models\DeferredBinding
                    
        
        Bind a deferred relationship to the supplied record.
| Property | Type | Description | 
|---|---|---|
| $relation | string | string | 
| $record | Illuminate\Database\Eloquent\Model | Illuminate\Database\Eloquent\Model | 
| $sessionKey | string | string | 
| $pivotData | array | array | 
public cancelDeferred (string $sessionKey) : void
Cancel all deferred bindings to this model.
| Property | Type | Description | 
|---|---|---|
| $sessionKey | string | string | 
public commitDeferred (string $sessionKey) : void
Commit all deferred bindings to this model.
| Property | Type | Description | 
|---|---|---|
| $sessionKey | string | string | 
public isDeferrable (string $relationName) : bool
Returns true if a relation exists and can be deferred.
| Property | Type | Description | 
|---|---|---|
| $relationName | string | string | 
public unbindDeferred (string $relation, Illuminate\Database\Eloquent\Model $record, string $sessionKey) : Winter\Storm\Database\Models\DeferredBinding
Unbind a deferred relationship to the supplied record.
| Property | Type | Description | 
|---|---|---|
| $relation | string | string | 
| $record | Illuminate\Database\Eloquent\Model | Illuminate\Database\Eloquent\Model | 
| $sessionKey | string | string | 
protected commitDeferredAfter (string $sessionKey) : void
Internally used method to commit all deferred bindings after saving.
| Property | Type | Description | 
|---|---|---|
| $sessionKey | string | string | 
protected commitDeferredBefore (string $sessionKey) : void
Internally used method to commit all deferred bindings before saving.
It is a rare need to have to call this, since it only applies to the "belongs to" relationship which generally does not need deferring.
| Property | Type | Description | 
|---|---|---|
| $sessionKey | string | string | 
            
            
            
                protected
            
                        
            commitDeferredOfType (string $sessionKey, $include = null, $exclude = null)
                            : void
                    
        
        Internal method for committing deferred relations.
| Property | Type | Description | 
|---|---|---|
| $sessionKey | string | string | 
| $include | mixed | mixed | 
| $exclude | mixed | mixed | 
protected getDeferrableRelationTypes () : array
Returns all possible relation types that can be deferred.
protected getDeferredBindingRecords (string $sessionKey) : Winter\Storm\Database\Collection
Returns any outstanding binding records for this model.
| Property | Type | Description | 
|---|---|---|
| $sessionKey | string | string | 
Used by
| Class | Description | 
|---|---|
| File | File attachment model | 
| Parameter | Parameters model Used for storing internal application parameters. | 
| Revision | Revision history model | 
| User | Administrator user model | 
| UserGroup | Administrator group | 
| UserPreference | All preferences for the backend user | 
| UserRole | Administrator role | 
| UserThrottle | Administrator throttling model | 
| Group | Group model | 
| Preferences | User Preferences model | 
| Role | Role model | 
| Throttle | Throttle model | 
| User | User model | 
| File | File attachment model | 
| Model | Active Record base class. | 
| DeferredBinding | Deferred Binding Model | 
| Revision | Revision Model | 
| MorphPivot | Reimplementation of \Illuminate\Database\Eloquent\Relations\MorphPivot but extends Winter's Pivot base class instead of Laravel's to get access to Winter magic. | 
| Pivot |