-
Docs
Backend
-
Behaviors
-
Classes
-
Controllers
-
Database
-
Seeds
-
-
Facades
-
FormWidgets
-
Helpers
-
Exception
- Backend
-
-
Models
-
ReportWidgets
-
Skins
-
Traits
-
Widgets
- ServiceProvider
-
-
Cms
-
Classes
- Asset
- AutoDatasource
- CmsCompoundObject
- CmsController
- CmsException
- CmsObject
- CmsObjectCollection
- CodeBase
- CodeParser
- ComponentBase
- ComponentHelpers
- ComponentManager
- ComponentPartial
- Content
- Controller
- Layout
- LayoutCode
- MediaLibrary
- MediaLibraryItem
- MediaViewHelper
- Meta
- ObjectMemoryCache
- Page
- PageCode
- Partial
- PartialCode
- PartialStack
- Router
- Theme
- ThemeManager
-
Components
-
Contracts
-
Controllers
-
Facades
-
FormWidgets
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- ComponentNode
- ComponentTokenParser
- ContentNode
- ContentTokenParser
- DebugExtension
- DefaultNode
- DefaultTokenParser
- Extension
- FlashNode
- FlashTokenParser
- FrameworkNode
- FrameworkTokenParser
- Loader
- PageNode
- PageTokenParser
- PartialNode
- PartialTokenParser
- PlaceholderNode
- PlaceholderTokenParser
- PutNode
- PutTokenParser
- ScriptsNode
- ScriptsTokenParser
- StylesNode
- StylesTokenParser
-
Widgets
- ServiceProvider
-
-
System
-
Behaviors
-
Classes
-
Console
-
Controllers
-
Database
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- ServiceProvider
-
-
Events
-
backend
-
ajax
-
filter
-
form
-
list
-
menu
-
page
-
user
-
-
cms
-
ajax
-
block
-
combiner
-
component
-
object
-
page
-
router
-
template
-
theme
-
-
halcyon
-
datasource
-
-
mailer
-
media
-
model
-
system
-
assets
-
console
-
mirror
-
theme
-
-
reportwidgets
-
settings
- extendConfigFile
-
-
translator
-
-
Library
-
Argon
-
Auth
-
Models
- AuthException
- Manager
-
-
Config
-
Cookie
-
Middleware
-
-
Database
-
Attach
-
Behaviors
-
Concerns
-
Connections
-
Connectors
-
Models
-
Relations
-
Schema
-
Traits
-
Updates
- README
- Builder
- Collection
- DatabaseServiceProvider
- DataFeed
- Dongle
- MemoryCache
- Model
- ModelBehavior
- ModelException
- NestedTreeScope
- Pivot
- QueryBuilder
- SortableScope
- TreeCollection
- Updater
-
-
Events
-
Exception
-
Extension
-
Filesystem
-
Flash
-
Foundation
-
Bootstrap
-
Console
-
Exception
-
Http
-
Middleware
- Kernel
-
-
Providers
- Application
- Maker
-
-
Halcyon
-
Datasource
-
Exception
-
Processors
-
Traits
- README
- Builder
- Collection
- HalcyonServiceProvider
- MemoryCacheManager
- MemoryRepository
- Model
-
-
Html
-
Mail
-
Network
-
Parse
-
Router
-
Scaffold
-
Support
-
Translation
-
- Documentation
- API
- Library
- Database
- Model
October\Rain\Database\Model
Source: ~/vendor/october/rain/src/Database/Model.php
Extends:
- Illuminate\Database\Eloquent\Model
Implements:
- Illuminate\Contracts\Routing\UrlRoutable
- Illuminate\Contracts\Queue\QueueableEntity
- JsonSerializable
- Illuminate\Contracts\Support\Jsonable
- Illuminate\Contracts\Support\Arrayable
- ArrayAccess
Active Record base class.
Extends Eloquent with added extendability and deferred bindings.
Public properties
public array $implement
Behaviors implemented by this model.
public array $attributes
Make the model's attributes public so behaviors can modify them.
public bool $duplicateCache
Indicates if duplicate queries from this model should be cached in memory.
public array $hasMany
Cleaner declaration of relationships. Uses a similar approach to the relation methods used by Eloquent, but as separate properties that make the class file less cluttered.
It should be declared with keys as the relation name, and value being a mixed array. The relation type $morphTo does not include a classname as the first value.
Example: class Order extends Model { protected $hasMany = [ 'items' => 'Item' ]; }
public $hasOne
protected $hasOne = [ 'owner' => ['User', 'key' => 'user_id'] ];
public $belongsTo
protected $belongsTo = [ 'parent' => ['Category', 'key' => 'parent_id'] ];
public $belongsToMany
protected $belongsToMany = [ 'groups' => ['Group', 'table'=> 'join_groups_users'] ];
public $morphTo
protected $morphTo = [ 'pictures' => [] ];
public $morphOne
protected $morphOne = [ 'log' => ['History', 'name' => 'user'] ];
public $morphMany
protected $morphMany = [ 'log' => ['History', 'name' => 'user'] ];
public $morphToMany
protected $morphToMany = [ 'tag' => ['Tag', 'table' => 'tagables', 'name' => 'tagable'] ];
public $morphedByMany
public $attachOne
protected $attachOne = [ 'picture' => ['October\Rain\Database\Attach\File', 'public' => false] ];
public $attachMany
protected $attachMany = [ 'pictures' => ['October\Rain\Database\Attach\File', 'name'=> 'imageable'] ];
public $hasManyThrough
protected $attachMany = [ 'pictures' => ['Picture', 'name'=> 'imageable'] ];
public string $sessionKey
A unique session key used for deferred binding.
Show inherited public properties
Inherited public properties
- public bool $incrementing - defined in Illuminate\Database\Eloquent\Model. Indicates if the IDs are auto-incrementing.
- public bool $exists - defined in Illuminate\Database\Eloquent\Model. Indicates if the model exists.
- public bool $wasRecentlyCreated - defined in Illuminate\Database\Eloquent\Model. Indicates if the model was inserted during the current request lifecycle.
- public static bool $snakeAttributes - defined in Illuminate\Database\Eloquent\Model. Indicates whether attributes are snake cased on arrays.
- public static array $manyMethods - defined in Illuminate\Database\Eloquent\Model. The many to many relationship methods.
- public bool $timestamps - defined in Illuminate\Database\Eloquent\Model. Indicates if the model should be timestamped.
Protected properties
protected array $jsonable
List of attribute names which are json encoded and decoded from the database.
protected array $dates
List of datetime attributes to convert to an instance of Carbon/DateTime objects.
protected static array $eventsBooted
The array of models booted events.
protected static array $relationTypes
Excepted relationship types, used to cycle and verify relationships.
protected array $emitterSingleEventCollection
Collection of registered events to be fired once only.
protected array $emitterEventCollection
Collection of registered events.
protected array $emitterEventSorted
Sorted collection of events.
protected array $extensionData
Class reflection information, including behaviors.
protected static array $extendableCallbacks
Used to extend the constructor of an extendable class. Eg:
Class::extend(function($obj) { })
protected static array $extendableStaticMethods
Collection of static methods used by behaviors.
protected static bool $extendableGuardProperties
Indicates if dynamic properties can be created.
Show inherited protected properties
Inherited protected properties
- protected string $connection - defined in Illuminate\Database\Eloquent\Model. The connection name for the model.
- protected string $table - defined in Illuminate\Database\Eloquent\Model. The table associated with the model.
- protected string $primaryKey - defined in Illuminate\Database\Eloquent\Model. The primary key for the model.
- protected string $keyType - defined in Illuminate\Database\Eloquent\Model. The "type" of the auto-incrementing ID.
- protected array $with - defined in Illuminate\Database\Eloquent\Model. The relations to eager load on every query.
- protected array $withCount - defined in Illuminate\Database\Eloquent\Model. The relationship counts that should be eager loaded on every query.
- protected int $perPage - defined in Illuminate\Database\Eloquent\Model. The number of models to return for pagination.
- protected static Illuminate\Database\ConnectionResolverInterface $resolver - defined in Illuminate\Database\Eloquent\Model. The connection resolver instance.
- protected static Illuminate\Contracts\Events\Dispatcher $dispatcher - defined in Illuminate\Database\Eloquent\Model. The event dispatcher instance.
- protected static array $booted - defined in Illuminate\Database\Eloquent\Model. The array of booted models.
- protected static array $globalScopes - defined in Illuminate\Database\Eloquent\Model. The array of global scopes on the model.
- protected array $original - defined in Illuminate\Database\Eloquent\Model. The model attribute's original state.
- protected array $changes - defined in Illuminate\Database\Eloquent\Model. The changed model attributes.
- protected array $casts - defined in Illuminate\Database\Eloquent\Model. The attributes that should be cast to native types.
- protected string $dateFormat - defined in Illuminate\Database\Eloquent\Model. The storage format of the model's date columns.
- protected array $appends - defined in Illuminate\Database\Eloquent\Model. The accessors to append to the model's array form.
- protected static array $mutatorCache - defined in Illuminate\Database\Eloquent\Model. The cache of the mutated attributes for each class.
- protected array $dispatchesEvents - defined in Illuminate\Database\Eloquent\Model. The event map for the model.
- protected array $observables - defined in Illuminate\Database\Eloquent\Model. User exposed observable events.
- protected array $relations - defined in Illuminate\Database\Eloquent\Model. The loaded relationships for the model.
- protected array $touches - defined in Illuminate\Database\Eloquent\Model. The relationships that should be touched on save.
- protected array $hidden - defined in Illuminate\Database\Eloquent\Model. The attributes that should be hidden for serialization.
- protected array $visible - defined in Illuminate\Database\Eloquent\Model. The attributes that should be visible in serialization.
- protected array $fillable - defined in Illuminate\Database\Eloquent\Model. The attributes that are mass assignable.
- protected array $guarded - defined in Illuminate\Database\Eloquent\Model. The attributes that aren't mass assignable.
- protected static bool $unguarded - defined in Illuminate\Database\Eloquent\Model. Indicates if all mass assignment is enabled.
Public methods
public void __call($name, $params)
Parameters
- $name
- $params
public void __construct($attributes=array())
Constructor
Parameters
- $attributes
public void __get($name)
Parameters
- $name
public bool __isset(string $key)
Determine if an attribute or relation exists on the model.
Parameters
- string $key
public void __set($name, $value)
Parameters
- $name
- $value
public void addCasts(array $attributes)
Add attribute casts for the model.
Parameters
- array $attributes
public void addDateAttribute(string $attribute)
Adds a datetime attribute to convert to an instance of Carbon/DateTime object.
Parameters
- string $attribute
public void addDynamicMethod(string $dynamicName, callable $method, string $extension=NULL)
Programmatically adds a method to the extendable class
Parameters
- string $dynamicName
- callable $method
- string $extension
public void addDynamicProperty(string $dynamicName, string $value=NULL)
Programmatically adds a property to the extendable class
Parameters
- string $dynamicName
- string $value
public void addFillable(array|string|null $attributes=NULL)
Add fillable attributes for the model.
Parameters
- array|string|null $attributes
public void addJsonable(array|string|null $attributes=NULL)
Add jsonable attributes for the model.
Parameters
- array|string|null $attributes
public bool alwaysPush(array $options, string $sessionKey)
Pushes the first level of relations even if the parent model has no changes.
Parameters
- array $options
- string $sessionKey
public mixed asExtension(string $shortName)
Short hand for getClassExtension()
method, except takes the short
extension name, example:
$this->asExtension('FormController')
Parameters
- string $shortName
public October\Rain\Database\Relations\MorphMany attachMany($related, $isPublic=NULL, $localKey=NULL, $relationName=NULL)
Define an attachment one-to-many relationship. This code is a duplicate of Eloquent but uses a Rain relation class.
Parameters
- $related
- $isPublic
- $localKey
- $relationName
public October\Rain\Database\Relations\MorphOne attachOne($related, $isPublic=true, $localKey=NULL, $relationName=NULL)
Define an attachment one-to-one relationship. This code is a duplicate of Eloquent but uses a Rain relation class.
Parameters
- $related
- $isPublic
- $localKey
- $relationName
public array attributesToArray()
Convert the model's attributes to an array.
public October\Rain\Database\Relations\BelongsTo belongsTo($related, $foreignKey=NULL, $parentKey=NULL, $relationName=NULL)
Define an inverse one-to-one or many relationship. Overridden from {@link Eloquent\Model} to allow the usage of the intermediary methods to handle the {@link $relationsData} array.
Parameters
- $related
- $foreignKey
- $parentKey
- $relationName
public October\Rain\Database\Relations\BelongsToMany belongsToMany($related, $table=NULL, $primaryKey=NULL, $foreignKey=NULL, $parentKey=NULL, $relatedKey=NULL, $relationName=NULL)
Define a many-to-many relationship. This code is almost a duplicate of Eloquent but uses a Rain relation class.
Parameters
- $related
- $table
- $primaryKey
- $foreignKey
- $parentKey
- $relatedKey
- $relationName
public void bindDeferred($relation, $record, $sessionKey)
Bind a deferred relationship to the supplied record.
Parameters
- $relation
- $record
- $sessionKey
public self bindEvent($event, $callback, $priority=0)
Create a new event binding.
Parameters
- $event
- $callback
- $priority
public self bindEventOnce($event, $callback)
Create a new event binding that fires once only
Parameters
- $event
- $callback
public void cancelDeferred($sessionKey)
Cancel all deferred bindings to this model.
Parameters
- $sessionKey
public static void clearExtendedClasses()
Clear the list of extended classes so they will be re-extended.
public void commitDeferred($sessionKey)
Commit all deferred bindings to this model.
Parameters
- $sessionKey
public static Illuminate\Database\Eloquent\Model|static create(array $attributes=array(), string $sessionKey=NULL)
Save a new model and return the instance.
Parameters
- array $attributes
- string $sessionKey
public static void extend($callback)
Extend this object properties upon construction.
Parameters
- $callback
public void extendClassWith(string $extensionName)
Dynamically extend a class with a specified behavior
Parameters
- string $extensionName
public mixed extendableCall(string $name, array $params=NULL)
Magic method for __call()
Parameters
- string $name
- array $params
public static mixed extendableCallStatic(string $name, array $params=NULL)
Magic method for __callStatic()
Parameters
- string $name
- array $params
public void extendableConstruct()
This method should be called as part of the constructor.
public static void extendableExtendCallback(callable $callback)
Helper method for ::extend()
static method
Parameters
- callable $callback
public string extendableGet(string $name)
Magic method for __get()
Parameters
- string $name
public string extendableSet(string $name, string $value)
Magic method for __set()
Parameters
- string $name
- string $value
public static void fetched(Closure|string $callback)
Create a new native event for handling afterFetch().
Parameters
- Closure|string $callback
public static void fetching(Closure|string $callback)
Create a new native event for handling beforeFetch().
Parameters
- Closure|string $callback
public array fireEvent(string $event, array $params=array(), boolean $halt=false)
Fire an event and call the listeners.
Parameters
- string $event - Event name
- array $params - Event parameters
- boolean $halt - Halt after first non-null result
public static void flushDuplicateCache()
Flush the memory cache.
public static void flushEventListeners()
Remove all of the event listeners for the model Also flush registry of models that had events booted Allows painless unit testing.
public October\Rain\Argon\Argon freshTimestamp()
Get a fresh timestamp for the model.
public string fromDateTime(DateTime|int $value)
Convert a DateTime to a storable string.
Parameters
- DateTime|int $value
public mixed getAttribute($key)
Get an attribute from the model. Overrided from {@link Eloquent} to implement recognition of the relation.
Parameters
- $key
public mixed getAttributeValue(string $key)
Get a plain attribute (not a relationship).
Parameters
- string $key
public mixed getClassExtension(string $name)
Returns a behavior object from an extendable class, example:
$this->getClassExtension('Backend.Behaviors.FormController')
Parameters
- string $name - Fully qualified behavior name
public array getClassMethods()
Get a list of class methods, extension equivalent of get_class_methods()
public array getDynamicProperties()
Returns all dynamic properties and their values
public array getJsonable()
Get the jsonable attributes name
public array getObservableEvents()
Get the observable event names.
public array getRelationDefinition(string $name)
Returns relationship details from a supplied name.
Parameters
- string $name - Relation name
public array getRelationDefinitions()
Returns relationship details for all relations defined on this model.
public string getRelationType(string $name)
Returns a relationship type based on a supplied name.
Parameters
- string $name - Relation name
public void getRelationValue($relationName)
Returns a relation key value(s), not as an object.
Parameters
- $relationName
public bool hasGetMutator(string $key)
Determine if a get mutator exists for an attribute.
Parameters
- string $key
public October\Rain\Database\Relations\HasMany hasMany($related, $primaryKey=NULL, $localKey=NULL, $relationName=NULL)
Define a one-to-many relationship. This code is a duplicate of Eloquent but uses a Rain relation class.
Parameters
- $related
- $primaryKey
- $localKey
- $relationName
public October\Rain\Database\Relations\HasMany hasManyThrough($related, $through, $primaryKey=NULL, $throughKey=NULL, $localKey=NULL, $secondLocalKey=NULL, $relationName=NULL)
Define a has-many-through relationship. This code is a duplicate of Eloquent but uses a Rain relation class.
Parameters
- $related
- $through
- $primaryKey
- $throughKey
- $localKey
- $secondLocalKey
- $relationName
public October\Rain\Database\Relations\HasOne hasOne($related, $primaryKey=NULL, $localKey=NULL, $relationName=NULL)
Define a one-to-one relationship. This code is a duplicate of Eloquent but uses a Rain relation class.
Parameters
- $related
- $primaryKey
- $localKey
- $relationName
public bool hasRelation(string $name)
Checks if model has a relationship by supplied name.
Parameters
- string $name - Relation name
public bool hasSetMutator(string $key)
Determine if a set mutator exists for an attribute.
Parameters
- string $key
public boolean isClassExtendedWith(string $name)
Check if extendable class is extended with a behavior object
Parameters
- string $name - Fully qualified behavior name
public void isDeferrable($relationName)
Returns true if a relation exists and can be deferred.
Parameters
- $relationName
public array isJsonable($key)
Checks if an attribute is jsonable or not.
Parameters
- $key
public boolean isRelationPushable(string $name)
Determines whether the specified relation should be saved when push() is called instead of save() on the model. Default: true.
Parameters
- string $name - Relation name
public $this jsonable(array $jsonable)
Set the jsonable attributes for the model.
Parameters
- array $jsonable
public static Illuminate\Database\Eloquent\Model|static make(array $attributes=array())
Create a new model and return the instance.
Parameters
- array $attributes
public string makeRelation(string $name)
Returns a relation class object
Parameters
- string $name - Relation name
public boolean methodExists(string $name)
Checks if a method exists, extension equivalent of method_exists()
Parameters
- string $name
public October\Rain\Database\Relations\MorphMany morphMany($related, $name, $type=NULL, $id=NULL, $localKey=NULL, $relationName=NULL)
Define a polymorphic one-to-many relationship. This code is a duplicate of Eloquent but uses a Rain relation class.
Parameters
- $related
- $name
- $type
- $id
- $localKey
- $relationName
public October\Rain\Database\Relations\MorphOne morphOne($related, $name, $type=NULL, $id=NULL, $localKey=NULL, $relationName=NULL)
Define a polymorphic one-to-one relationship. This code is a duplicate of Eloquent but uses a Rain relation class.
Parameters
- $related
- $name
- $type
- $id
- $localKey
- $relationName
public October\Rain\Database\Relations\BelongsTo morphTo($name=NULL, $type=NULL, $id=NULL)
Define an polymorphic, inverse one-to-one or many relationship. Overridden from {@link Eloquent\Model} to allow the usage of the intermediary methods to handle the relation.
Parameters
- $name
- $type
- $id
public October\Rain\Database\Relations\MorphToMany morphToMany($related, $name, $table=NULL, $primaryKey=NULL, $foreignKey=NULL, $parentKey=NULL, $relatedKey=NULL, $inverse=false, $relationName=NULL)
Define a polymorphic many-to-many relationship. This code is almost a duplicate of Eloquent but uses a Rain relation class.
Parameters
- $related
- $name
- $table
- $primaryKey
- $foreignKey
- $parentKey
- $relatedKey
- $inverse
- $relationName
public October\Rain\Database\Relations\MorphToMany morphedByMany($related, $name, $table=NULL, $primaryKey=NULL, $foreignKey=NULL, $parentKey=NULL, $relatedKey=NULL, $relationName=NULL)
Define a polymorphic many-to-many inverse relationship. This code is almost a duplicate of Eloquent but uses a Rain relation class.
Parameters
- $related
- $name
- $table
- $primaryKey
- $foreignKey
- $parentKey
- $relatedKey
- $relationName
public October\Rain\Database\Collection newCollection(array $models=array())
Create a new Model Collection instance.
Parameters
- array $models
public October\Rain\Database\Builder|static newEloquentBuilder(October\Rain\Database\QueryBuilder $query)
Create a new Eloquent query builder for the model.
Parameters
public Illuminate\Database\Eloquent\Model|static newFromBuilder(array $attributes=array(), $connection=NULL)
Create a new model instance that is existing.
Parameters
- array $attributes
- $connection
public October\Rain\Database\Pivot newPivot(October\Rain\Database\Model $parent, array $attributes, string $table, bool $exists, string|null $using=NULL)
Create a generic pivot model instance.
Parameters
- October\Rain\Database\Model $parent
- array $attributes
- string $table
- bool $exists
- string|null $using
public October\Rain\Database\Pivot newRelationPivot(October\Rain\Database\Model $parent, string $relationName, array $attributes, string $table, bool $exists)
Create a pivot model instance specific to a relation.
Parameters
- October\Rain\Database\Model $parent
- string $relationName
- array $attributes
- string $table
- bool $exists
public bool offsetExists(mixed $offset)
This a custom piece of logic specifically to satisfy Twig's desire to return a relation object instead of loading the related model.
Parameters
- mixed $offset
public boolean propertyExists(string $name)
Checks if a property exists, extension equivalent of property_exists()
Parameters
- string $name
public bool push(array $options=NULL, null $sessionKey=NULL)
Save the model and all of its relationships.
Parameters
- array $options
- null $sessionKey
public Illuminate\Database\Eloquent\Model|static reload()
Reloads the model attributes from the database.
public void reloadRelations(string $relationName=NULL)
Reloads the model relationship cache.
Parameters
- string $relationName
public bool save(array $options=NULL, null $sessionKey=NULL)
Save the model to the database.
Parameters
- array $options
- null $sessionKey
public void setAttribute(string $key, mixed $value)
Set a given attribute on the model.
Parameters
- string $key
- mixed $value
public void unbindDeferred($relation, $record, $sessionKey)
Unbind a deferred relationship to the supplied record.
Parameters
- $relation
- $record
- $sessionKey
public self unbindEvent(string $event=NULL)
Destroys an event binding.
Parameters
- string $event - Event to destroy
Inherited public methods
- public static mixed __callStatic(string $method, array $parameters) - defined in Illuminate\Database\Eloquent\Model. Handle dynamic static method calls into the method.
- public string __toString() - defined in Illuminate\Database\Eloquent\Model. Convert the model to its string representation.
- public void __unset(string $key) - defined in Illuminate\Database\Eloquent\Model. Unset an attribute on the model.
- public void __wakeup() - defined in Illuminate\Database\Eloquent\Model. When a model is being unserialized, check if it needs to be booted.
- public static mixed addGlobalScope(Illuminate\Database\Eloquent\Scope|\Closure|string $scope, Closure|null $implementation=NULL) - defined in Illuminate\Database\Eloquent\Model. Register a new global scope on the model.
- public void addHidden(array|string|null $attributes=NULL) - defined in Illuminate\Database\Eloquent\Model. Add hidden attributes for the model.
- public void addObservableEvents(array|mixed $observables) - defined in Illuminate\Database\Eloquent\Model. Add an observable event name.
- public void addVisible(array|string|null $attributes=NULL) - defined in Illuminate\Database\Eloquent\Model. Add visible attributes for the model.
- public static Illuminate\Database\Eloquent\Collection|static[] all(array|mixed $columns=array( 0=>'*')) - defined in Illuminate\Database\Eloquent\Model. Get all of the models from the database.
- public $this append(array|string $attributes) - defined in Illuminate\Database\Eloquent\Model. Append attributes to query when building a query.
- public static void cacheMutatedAttributes(string $class) - defined in Illuminate\Database\Eloquent\Model. Extract and cache all the mutated attributes of a class.
- public static void clearBootedModels() - defined in Illuminate\Database\Eloquent\Model. Clear the list of booted models so they will be re-booted.
- public static void created(Closure|string $callback) - defined in Illuminate\Database\Eloquent\Model. Register a created model event with the dispatcher.
- public static void creating(Closure|string $callback) - defined in Illuminate\Database\Eloquent\Model. Register a creating model event with the dispatcher.
- public bool|null delete() - defined in Illuminate\Database\Eloquent\Model. Delete the model from the database.
- public static void deleted(Closure|string $callback) - defined in Illuminate\Database\Eloquent\Model. Register a deleted model event with the dispatcher.
- public static void deleting(Closure|string $callback) - defined in Illuminate\Database\Eloquent\Model. Register a deleting model event with the dispatcher.
- public static int destroy(array|int $ids) - defined in Illuminate\Database\Eloquent\Model. Destroy the models for the given IDs.
- public $this fill(array $attributes) - defined in Illuminate\Database\Eloquent\Model. Fill the model with an array of attributes.
- public $this fillJsonAttribute(string $key, mixed $value) - defined in Illuminate\Database\Eloquent\Model. Set a given JSON attribute on the model.
- public $this fillable(array $fillable) - defined in Illuminate\Database\Eloquent\Model. Set the fillable attributes for the model.
- public bool|null forceDelete() - defined in Illuminate\Database\Eloquent\Model. Force a hard delete on a soft deleted model.
- public $this forceFill(array $attributes) - defined in Illuminate\Database\Eloquent\Model. Fill the model with an array of attributes. Force mass assignment.
- public static|null fresh(array|string $with=array()) - defined in Illuminate\Database\Eloquent\Model. Reload a fresh model instance from the database.
- public string freshTimestampString() - defined in Illuminate\Database\Eloquent\Model. Get a fresh timestamp for the model.
- public mixed fromJson(string $value, bool $asObject=false) - defined in Illuminate\Database\Eloquent\Model. Decode the given JSON back into an array or object.
- public static string getActualClassNameForMorph(string $class) - defined in Illuminate\Database\Eloquent\Model. Retrieve the actual class name for a given morph class.
- public array getAttributes() - defined in Illuminate\Database\Eloquent\Model. Get all of the current attributes on the model.
- public array getCasts() - defined in Illuminate\Database\Eloquent\Model. Get the casts array.
- public array getChanges() - defined in Illuminate\Database\Eloquent\Model. Get the attributes that were changed.
- public Illuminate\Database\Connection getConnection() - defined in Illuminate\Database\Eloquent\Model. Get the database connection for the model.
- public string getConnectionName() - defined in Illuminate\Database\Eloquent\Model. Get the current connection name for the model.
- public static Illuminate\Database\ConnectionResolverInterface getConnectionResolver() - defined in Illuminate\Database\Eloquent\Model. Get the connection resolver instance.
- public string getCreatedAtColumn() - defined in Illuminate\Database\Eloquent\Model. Get the name of the "created at" column.
- public array getDates() - defined in Illuminate\Database\Eloquent\Model. Get the attributes that should be converted to dates.
- public array getDirty() - defined in Illuminate\Database\Eloquent\Model. Get the attributes that have been changed since last sync.
- public static Illuminate\Contracts\Events\Dispatcher getEventDispatcher() - defined in Illuminate\Database\Eloquent\Model. Get the event dispatcher instance.
- public array getFillable() - defined in Illuminate\Database\Eloquent\Model. Get the fillable attributes for the model.
- public string getForeignKey() - defined in Illuminate\Database\Eloquent\Model. Get the default foreign key name for the model.
- public static Illuminate\Database\Eloquent\Scope|\Closure|null getGlobalScope(Illuminate\Database\Eloquent\Scope|string $scope) - defined in Illuminate\Database\Eloquent\Model. Get a global scope registered with the model.
- public array getGlobalScopes() - defined in Illuminate\Database\Eloquent\Model. Get the global scopes for this class instance.
- public array getGuarded() - defined in Illuminate\Database\Eloquent\Model. Get the guarded attributes for the model.
- public array getHidden() - defined in Illuminate\Database\Eloquent\Model. Get the hidden attributes for the model.
- public bool getIncrementing() - defined in Illuminate\Database\Eloquent\Model. Get the value indicating whether the IDs are incrementing.
- public mixed getKey() - defined in Illuminate\Database\Eloquent\Model. Get the value of the model's primary key.
- public string getKeyName() - defined in Illuminate\Database\Eloquent\Model. Get the primary key for the model.
- public string getKeyType() - defined in Illuminate\Database\Eloquent\Model. Get the auto-incrementing key type.
- public string getMorphClass() - defined in Illuminate\Database\Eloquent\Model. Get the class name for polymorphic relations.
- public array getMutatedAttributes() - defined in Illuminate\Database\Eloquent\Model. Get the mutated attributes for a given instance.
- public mixed|array getOriginal(string|null $key=NULL, mixed $default=NULL) - defined in Illuminate\Database\Eloquent\Model. Get the model's original attribute values.
- public int getPerPage() - defined in Illuminate\Database\Eloquent\Model. Get the number of models to return per page.
- public string getQualifiedKeyName() - defined in Illuminate\Database\Eloquent\Model. Get the table qualified key name.
- public mixed getQueueableConnection() - defined in Illuminate\Database\Eloquent\Model. Get the queueable connection for the entity.
- public mixed getQueueableId() - defined in Illuminate\Database\Eloquent\Model. Get the queueable identity for the entity.
- public mixed getRelation(string $relation) - defined in Illuminate\Database\Eloquent\Model. Get a specified relationship.
- public array getRelations() - defined in Illuminate\Database\Eloquent\Model. Get all the loaded relations for the instance.
- public mixed getRouteKey() - defined in Illuminate\Database\Eloquent\Model. Get the value of the model's route key.
- public string getRouteKeyName() - defined in Illuminate\Database\Eloquent\Model. Get the route key for the model.
- public string getTable() - defined in Illuminate\Database\Eloquent\Model. Get the table associated with the model.
- public array getTouchedRelations() - defined in Illuminate\Database\Eloquent\Model. Get the relationships that are touched on save.
- public string getUpdatedAtColumn() - defined in Illuminate\Database\Eloquent\Model. Get the name of the "updated at" column.
- public array getVisible() - defined in Illuminate\Database\Eloquent\Model. Get the visible attributes for the model.
- public $this guard(array $guarded) - defined in Illuminate\Database\Eloquent\Model. Set the guarded attributes for the model.
- public bool hasCast(string $key, array|string|null $types=NULL) - defined in Illuminate\Database\Eloquent\Model. Determine whether an attribute should be cast to a native type.
- public static bool hasGlobalScope(Illuminate\Database\Eloquent\Scope|string $scope) - defined in Illuminate\Database\Eloquent\Model. Determine if a model has a global scope.
- public bool is(Illuminate\Database\Eloquent\Model|null $model) - defined in Illuminate\Database\Eloquent\Model. Determine if two models have the same ID and belong to the same table.
- public bool isClean(array|string|null $attributes=NULL) - defined in Illuminate\Database\Eloquent\Model. Determine if the model or given attribute(s) have remained the same.
- public bool isDirty(array|string|null $attributes=NULL) - defined in Illuminate\Database\Eloquent\Model. Determine if the model or given attribute(s) have been modified.
- public bool isFillable(string $key) - defined in Illuminate\Database\Eloquent\Model. Determine if the given attribute may be mass assigned.
- public bool isGuarded(string $key) - defined in Illuminate\Database\Eloquent\Model. Determine if the given key is guarded.
- public bool isNot(Illuminate\Database\Eloquent\Model|null $model) - defined in Illuminate\Database\Eloquent\Model. Determine if two models are not the same.
- public static bool isUnguarded() - defined in Illuminate\Database\Eloquent\Model. Determine if current state is "unguarded".
- public string joiningTable(string $related) - defined in Illuminate\Database\Eloquent\Model. Get the joining table name for a many-to-many relation.
- public array jsonSerialize() - defined in Illuminate\Database\Eloquent\Model. Convert the object into something JSON serializable.
- public $this load(array|string $relations) - defined in Illuminate\Database\Eloquent\Model. Eager load relations on the model.
- public $this loadMissing(array|string $relations) - defined in Illuminate\Database\Eloquent\Model. Eager load relations on the model if they are not already eager loaded.
- public $this makeHidden(array|string $attributes) - defined in Illuminate\Database\Eloquent\Model. Make the given, typically visible, attributes hidden.
- public $this makeVisible(array|string $attributes) - defined in Illuminate\Database\Eloquent\Model. Make the given, typically hidden, attributes visible.
- public static newInstance(array $attributes=array(), bool $exists=false) - defined in Illuminate\Database\Eloquent\Model. Create a new instance of the given model.
- public Illuminate\Database\Eloquent\Builder|static newModelQuery() - defined in Illuminate\Database\Eloquent\Model. Get a new query builder that doesn't have any global scopes or eager loading.
- public Illuminate\Database\Eloquent\Builder newQuery() - defined in Illuminate\Database\Eloquent\Model. Get a new query builder for the model's table.
- public Illuminate\Database\Eloquent\Builder newQueryForRestoration(array|int $ids) - defined in Illuminate\Database\Eloquent\Model. Get a new query to restore one or more models by their queueable IDs.
- public Illuminate\Database\Eloquent\Builder newQueryWithoutRelationships() - defined in Illuminate\Database\Eloquent\Model. Get a new query builder with no relationships loaded.
- public Illuminate\Database\Eloquent\Builder newQueryWithoutScope(Illuminate\Database\Eloquent\Scope|string $scope) - defined in Illuminate\Database\Eloquent\Model. Get a new query instance without a given scope.
- public Illuminate\Database\Eloquent\Builder|static newQueryWithoutScopes() - defined in Illuminate\Database\Eloquent\Model. Get a new query builder that doesn't have any global scopes.
- public static void observe(object|string $class) - defined in Illuminate\Database\Eloquent\Model. Register an observer with the Model.
- public mixed offsetGet(mixed $offset) - defined in Illuminate\Database\Eloquent\Model. Get the value for a given offset.
- public void offsetSet(mixed $offset, mixed $value) - defined in Illuminate\Database\Eloquent\Model. Set the value for a given offset.
- public void offsetUnset(mixed $offset) - defined in Illuminate\Database\Eloquent\Model. Unset the value for a given offset.
- public static Illuminate\Database\Eloquent\Builder on(string|null $connection=NULL) - defined in Illuminate\Database\Eloquent\Model. Begin querying the model on a given connection.
- public static Illuminate\Database\Query\Builder onWriteConnection() - defined in Illuminate\Database\Eloquent\Model. Begin querying the model on the write connection.
- public array only(array|mixed $attributes) - defined in Illuminate\Database\Eloquent\Model. Get a subset of the model's attributes.
- public string qualifyColumn(string $column) - defined in Illuminate\Database\Eloquent\Model. Qualify the given column name by the model's table.
- public static Illuminate\Database\Eloquent\Builder query() - defined in Illuminate\Database\Eloquent\Model. Begin querying the model.
- public $this refresh() - defined in Illuminate\Database\Eloquent\Model. Reload the current model instance with fresh attributes from the database.
- public Illuminate\Database\Eloquent\Builder registerGlobalScopes(Illuminate\Database\Eloquent\Builder $builder) - defined in Illuminate\Database\Eloquent\Model. Register the global scopes for this builder instance.
- public static void reguard() - defined in Illuminate\Database\Eloquent\Model. Enable the mass assignment restrictions.
- public bool relationLoaded(string $key) - defined in Illuminate\Database\Eloquent\Model. Determine if the given relation is loaded.
- public array relationsToArray() - defined in Illuminate\Database\Eloquent\Model. Get the model's relationships in array form.
- public void removeObservableEvents(array|mixed $observables) - defined in Illuminate\Database\Eloquent\Model. Remove an observable event name.
- public Illuminate\Database\Eloquent\Model replicate(array|null $except=NULL) - defined in Illuminate\Database\Eloquent\Model. Clone the model into a new, non-existing instance.
- public static Illuminate\Database\Connection resolveConnection(string|null $connection=NULL) - defined in Illuminate\Database\Eloquent\Model. Resolve a connection instance.
- public Illuminate\Database\Eloquent\Model|null resolveRouteBinding(mixed $value) - defined in Illuminate\Database\Eloquent\Model. Retrieve the model for a bound value.
- public static void retrieved(Closure|string $callback) - defined in Illuminate\Database\Eloquent\Model. Register a retrieved model event with the dispatcher.
- public bool saveOrFail(array $options=array()) - defined in Illuminate\Database\Eloquent\Model. Save the model to the database using transaction.
- public static void saved(Closure|string $callback) - defined in Illuminate\Database\Eloquent\Model. Register a saved model event with the dispatcher.
- public static void saving(Closure|string $callback) - defined in Illuminate\Database\Eloquent\Model. Register a saving model event with the dispatcher.
- public $this setAppends(array $appends) - defined in Illuminate\Database\Eloquent\Model. Set the accessors to append to model arrays.
- public $this setConnection(string $name) - defined in Illuminate\Database\Eloquent\Model. Set the connection associated with the model.
- public static void setConnectionResolver(Illuminate\Database\ConnectionResolverInterface $resolver) - defined in Illuminate\Database\Eloquent\Model. Set the connection resolver instance.
- public $this setCreatedAt(mixed $value) - defined in Illuminate\Database\Eloquent\Model. Set the value of the "created at" attribute.
- public $this setDateFormat(string $format) - defined in Illuminate\Database\Eloquent\Model. Set the date format used by the model.
- public static void setEventDispatcher(Illuminate\Contracts\Events\Dispatcher $dispatcher) - defined in Illuminate\Database\Eloquent\Model. Set the event dispatcher instance.
- public $this setHidden(array $hidden) - defined in Illuminate\Database\Eloquent\Model. Set the hidden attributes for the model.
- public $this setIncrementing(bool $value) - defined in Illuminate\Database\Eloquent\Model. Set whether IDs are incrementing.
- public $this setKeyName(string $key) - defined in Illuminate\Database\Eloquent\Model. Set the primary key for the model.
- public $this setKeyType(string $type) - defined in Illuminate\Database\Eloquent\Model. Set the data type for the primary key.
- public $this setObservableEvents(array $observables) - defined in Illuminate\Database\Eloquent\Model. Set the observable event names.
- public $this setPerPage(int $perPage) - defined in Illuminate\Database\Eloquent\Model. Set the number of models to return per page.
- public $this setRawAttributes(array $attributes, bool $sync=false) - defined in Illuminate\Database\Eloquent\Model. Set the array of model attributes. No checking is done.
- public $this setRelation(string $relation, mixed $value) - defined in Illuminate\Database\Eloquent\Model. Set the specific relationship in the model.
- public $this setRelations(array $relations) - defined in Illuminate\Database\Eloquent\Model. Set the entire relations array on the model.
- public $this setTable(string $table) - defined in Illuminate\Database\Eloquent\Model. Set the table associated with the model.
- public $this setTouchedRelations(array $touches) - defined in Illuminate\Database\Eloquent\Model. Set the relationships that are touched on save.
- public $this setUpdatedAt(mixed $value) - defined in Illuminate\Database\Eloquent\Model. Set the value of the "updated at" attribute.
- public $this setVisible(array $visible) - defined in Illuminate\Database\Eloquent\Model. Set the visible attributes for the model.
- public $this syncChanges() - defined in Illuminate\Database\Eloquent\Model. Sync the changed attributes.
- public $this syncOriginal() - defined in Illuminate\Database\Eloquent\Model. Sync the original attributes with the current.
- public $this syncOriginalAttribute(string $attribute) - defined in Illuminate\Database\Eloquent\Model. Sync a single original attribute with its current value.
- public array toArray() - defined in Illuminate\Database\Eloquent\Model. Convert the model instance to an array.
- public string toJson(int $options=0) - defined in Illuminate\Database\Eloquent\Model. Convert the model instance to JSON.
- public bool totallyGuarded() - defined in Illuminate\Database\Eloquent\Model. Determine if the model is totally guarded.
- public bool touch() - defined in Illuminate\Database\Eloquent\Model. Update the model's update timestamp.
- public void touchOwners() - defined in Illuminate\Database\Eloquent\Model. Touch the owning relations of the model.
- public bool touches(string $relation) - defined in Illuminate\Database\Eloquent\Model. Determine if the model touches a given relation.
- public static void unguard(bool $state=true) - defined in Illuminate\Database\Eloquent\Model. Disable all mass assignable restrictions.
- public static mixed unguarded(callable $callback) - defined in Illuminate\Database\Eloquent\Model. Run the given callable while being unguarded.
- public static void unsetConnectionResolver() - defined in Illuminate\Database\Eloquent\Model. Unset the connection resolver for models.
- public static void unsetEventDispatcher() - defined in Illuminate\Database\Eloquent\Model. Unset the event dispatcher for models.
- public bool update(array $attributes=array(), array $options=array()) - defined in Illuminate\Database\Eloquent\Model. Update the model in the database.
- public static void updated(Closure|string $callback) - defined in Illuminate\Database\Eloquent\Model. Register an updated model event with the dispatcher.
- public static void updating(Closure|string $callback) - defined in Illuminate\Database\Eloquent\Model. Register an updating model event with the dispatcher.
- public bool usesTimestamps() - defined in Illuminate\Database\Eloquent\Model. Determine if the model uses timestamps.
- public bool wasChanged(array|string|null $attributes=NULL) - defined in Illuminate\Database\Eloquent\Model. Determine if the model or given attribute(s) have been modified.
- public static Illuminate\Database\Eloquent\Builder|static with(array|string $relations) - defined in Illuminate\Database\Eloquent\Model. Begin querying a model with eager loading.
Protected methods
protected void afterCreate()
Handle the "created" model event
protected void afterDelete()
Handle the "deleted" model event
protected void afterFetch()
Handle the "fetched" model event
protected void afterSave()
Handle the "saved" model event
protected void afterUpdate()
Handle the "updated" model event
protected Carbon\Carbon asDateTime(mixed $value)
Return a timestamp as DateTime object.
Parameters
- mixed $value
protected void beforeCreate()
Handle the "creating" model event
protected void beforeDelete()
Handle the "deleting" model event
protected void beforeFetch()
Handle the "fetching" model event
protected void beforeSave()
Handle the "saving" model event
protected void beforeUpdate()
Handle the "updating" model event
protected void bootNicerEvents()
Bind some nicer events to this model, in the format of method overrides.
protected void commitDeferredAfter($sessionKey)
Internally used method to commit all deferred bindings after saving.
Parameters
- $sessionKey
protected void commitDeferredBefore($sessionKey)
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.
Parameters
- $sessionKey
protected void commitDeferredOfType($sessionKey, $include=NULL, $exclude=NULL)
Internal method for committing deferred relations.
Parameters
- $sessionKey
- $include
- $exclude
protected array emitterEventSortEvents(string $eventName)
Sort the listeners for a given event by priority.
Parameters
- string $eventName
protected boolean extendableIsAccessible(mixed $class, string $propertyName)
Checks if a property is accessible, property equivalent of is_callable()
Parameters
- mixed $class
- string $propertyName
protected void extensionExtractMethods(string $extensionName, object $extensionObject)
Extracts the available methods from a behavior and adds it to the list of callable methods.
Parameters
- string $extensionName
- object $extensionObject
protected array getDeferrableRelationTypes()
Returns all possible relation types that can be deferred.
protected October\Rain\Database\Collection getDeferredBindingRecords($sessionKey)
Returns any outstanding binding records for this model.
Parameters
- $sessionKey
protected void getRelationCaller()
Finds the calling function name from the stack trace.
protected array getRelationDefaults(string $type)
Returns default relation arguments for a given type.
Parameters
- string $type - Relation type
protected Illuminate\Database\Eloquent\Relations\Relation handleRelation(string $relationName)
Looks for the relation and does the correct magic as Eloquent would require inside relation methods. For more information, read the documentation of the mentioned property.
Parameters
- string $relationName - The relation key, camel-case version
protected Illuminate\Database\Eloquent\Relations\MorphTo morphEagerTo(string $name, string $type, string $id)
Define a polymorphic, inverse one-to-one or many relationship.
Parameters
- string $name
- string $type
- string $id
protected Illuminate\Database\Eloquent\Relations\MorphTo morphInstanceTo(string $target, string $name, string $type, string $id)
Define a polymorphic, inverse one-to-one or many relationship.
Parameters
- string $target
- string $name
- string $type
- string $id
protected October\Rain\Database\QueryBuilder newBaseQueryBuilder()
Get a new query builder instance for the connection.
protected void performDeleteOnModel()
Perform the actual delete query on this model instance.
protected void performDeleteOnRelations()
Locates relations with delete flag and cascades the delete event.
protected bool saveInternal(array $options=array())
Save the model to the database. Is used by {@link save()} and {@link forceSave()}.
Parameters
- array $options
protected void setRelationValue($relationName, $value)
Sets a relation value directly from its attribute.
Parameters
- $relationName
- $value
protected void validateRelationArgs($relationName, $optional, $required=array())
Validate relation supplied arguments.
Parameters
- $relationName
- $optional
- $required
Show inherited protected methods
Inherited protected methods
- protected array addCastAttributesToArray(array $attributes, array $mutatedAttributes) - defined in Illuminate\Database\Eloquent\Model. Add the casted attributes to the attributes array.
- protected array addDateAttributesToArray(array $attributes) - defined in Illuminate\Database\Eloquent\Model. Add the date attributes to the attributes array.
- protected array addMutatedAttributesToArray(array $attributes, array $mutatedAttributes) - defined in Illuminate\Database\Eloquent\Model. Add the mutated attributes to the attributes array.
- protected Illuminate\Support\Carbon asDate(mixed $value) - defined in Illuminate\Database\Eloquent\Model. Return a timestamp as DateTime object with time set to 00:00:00.
- protected string asJson(mixed $value) - defined in Illuminate\Database\Eloquent\Model. Encode the given value as JSON.
- protected int asTimestamp(mixed $value) - defined in Illuminate\Database\Eloquent\Model. Return a timestamp as unix timestamp.
- protected static void boot() - defined in Illuminate\Database\Eloquent\Model. The "booting" method of the model.
- protected void bootIfNotBooted() - defined in Illuminate\Database\Eloquent\Model. Check if the model needs to be booted and if so, do it.
- protected static void bootTraits() - defined in Illuminate\Database\Eloquent\Model. Boot all of the bootable traits on the model.
- protected mixed castAttribute(string $key, mixed $value) - defined in Illuminate\Database\Eloquent\Model. Cast an attribute to a native PHP type.
- protected string castAttributeAsJson(string $key, mixed $value) - defined in Illuminate\Database\Eloquent\Model. Cast the given attribute to JSON.
- protected int decrement(string $column, int $amount=1, array $extra=array()) - defined in Illuminate\Database\Eloquent\Model. Decrement a column's value by a given amount.
- protected array fillableFromArray(array $attributes) - defined in Illuminate\Database\Eloquent\Model. Get the fillable attributes of a given array.
- protected mixed filterModelEventResults(mixed $result) - defined in Illuminate\Database\Eloquent\Model. Filter the model event results.
- protected void finishSave(array $options) - defined in Illuminate\Database\Eloquent\Model. Perform any actions that are necessary after the model is saved.
- protected mixed|null fireCustomModelEvent(string $event, string $method) - defined in Illuminate\Database\Eloquent\Model. Fire a custom model event for the given event.
- protected mixed fireModelEvent(string $event, bool $halt=true) - defined in Illuminate\Database\Eloquent\Model. Fire the given event for the model.
- protected array getArrayAttributeByKey(string $key) - defined in Illuminate\Database\Eloquent\Model. Get an array attribute or return an empty array if it is not set.
- protected $this getArrayAttributeWithValue(string $path, string $key, mixed $value) - defined in Illuminate\Database\Eloquent\Model. Get an array attribute with the given key and value set.
- protected array getArrayableAppends() - defined in Illuminate\Database\Eloquent\Model. Get all of the appendable values that are arrayable.
- protected array getArrayableAttributes() - defined in Illuminate\Database\Eloquent\Model. Get an attribute array of all arrayable attributes.
- protected array getArrayableItems(array $values) - defined in Illuminate\Database\Eloquent\Model. Get an attribute array of all arrayable values.
- protected array getArrayableRelations() - defined in Illuminate\Database\Eloquent\Model. Get an attribute array of all arrayable relations.
- protected mixed getAttributeFromArray(string $key) - defined in Illuminate\Database\Eloquent\Model. Get an attribute from the $attributes array.
- protected string getCastType(string $key) - defined in Illuminate\Database\Eloquent\Model. Get the type of cast for a model attribute.
- protected string getDateFormat() - defined in Illuminate\Database\Eloquent\Model. Get the format for database stored dates.
- protected mixed getKeyForSaveQuery() - defined in Illuminate\Database\Eloquent\Model. Get the primary key value for a save query.
- protected array getMorphs(string $name, string $type, string $id) - defined in Illuminate\Database\Eloquent\Model. Get the polymorphic relationship columns.
- protected static array getMutatorMethods(mixed $class) - defined in Illuminate\Database\Eloquent\Model. Get all of the attribute mutator methods.
- protected mixed getRelationshipFromMethod(string $method) - defined in Illuminate\Database\Eloquent\Model. Get a relationship value from a method.
- protected string guessBelongsToManyRelation() - defined in Illuminate\Database\Eloquent\Model. Get the relationship name of the belongs to many.
- protected string guessBelongsToRelation() - defined in Illuminate\Database\Eloquent\Model. Guess the "belongs to" relationship name.
- protected bool hasChanges(array $changes, array|string|null $attributes=NULL) - defined in Illuminate\Database\Eloquent\Model. Determine if the given attributes were changed.
- protected int increment(string $column, int $amount=1, array $extra=array()) - defined in Illuminate\Database\Eloquent\Model. Increment a column's value by a given amount.
- protected int incrementOrDecrement(string $column, int $amount, array $extra, string $method) - defined in Illuminate\Database\Eloquent\Model. Run the increment or decrement method on the model.
- protected void incrementOrDecrementAttributeValue(string $column, int $amount, array $extra, string $method) - defined in Illuminate\Database\Eloquent\Model. Increment the underlying attribute value and sync with original.
- protected void insertAndSetId(Illuminate\Database\Eloquent\Builder $query, array $attributes) - defined in Illuminate\Database\Eloquent\Model. Insert the given attributes and set the ID on the model.
- protected bool isDateAttribute(string $key) - defined in Illuminate\Database\Eloquent\Model. Determine if the given attribute is a date or date castable.
- protected bool isDateCastable(string $key) - defined in Illuminate\Database\Eloquent\Model. Determine whether a value is Date / DateTime castable for inbound manipulation.
- protected bool isJsonCastable(string $key) - defined in Illuminate\Database\Eloquent\Model. Determine whether a value is JSON castable for inbound manipulation.
- protected bool isStandardDateFormat(string $value) - defined in Illuminate\Database\Eloquent\Model. Determine if the given value is a standard date format.
- protected mixed mutateAttribute(string $key, mixed $value) - defined in Illuminate\Database\Eloquent\Model. Get the value of an attribute using its mutator.
- protected mixed mutateAttributeForArray(string $key, mixed $value) - defined in Illuminate\Database\Eloquent\Model. Get the value of an attribute using its mutator for array conversion.
- protected Illuminate\Database\Eloquent\Relations\BelongsTo newBelongsTo(Illuminate\Database\Eloquent\Builder $query, Illuminate\Database\Eloquent\Model $child, string $foreignKey, string $ownerKey, string $relation) - defined in Illuminate\Database\Eloquent\Model. Instantiate a new BelongsTo relationship.
- protected Illuminate\Database\Eloquent\Relations\BelongsToMany newBelongsToMany(Illuminate\Database\Eloquent\Builder $query, Illuminate\Database\Eloquent\Model $parent, string $table, string $foreignPivotKey, string $relatedPivotKey, string $parentKey, string $relatedKey, string $relationName=NULL) - defined in Illuminate\Database\Eloquent\Model. Instantiate a new BelongsToMany relationship.
- protected Illuminate\Database\Eloquent\Relations\HasMany newHasMany(Illuminate\Database\Eloquent\Builder $query, Illuminate\Database\Eloquent\Model $parent, string $foreignKey, string $localKey) - defined in Illuminate\Database\Eloquent\Model. Instantiate a new HasMany relationship.
- protected Illuminate\Database\Eloquent\Relations\HasManyThrough newHasManyThrough(Illuminate\Database\Eloquent\Builder $query, Illuminate\Database\Eloquent\Model $farParent, Illuminate\Database\Eloquent\Model $throughParent, string $firstKey, string $secondKey, string $localKey, string $secondLocalKey) - defined in Illuminate\Database\Eloquent\Model. Instantiate a new HasManyThrough relationship.
- protected Illuminate\Database\Eloquent\Relations\HasOne newHasOne(Illuminate\Database\Eloquent\Builder $query, Illuminate\Database\Eloquent\Model $parent, string $foreignKey, string $localKey) - defined in Illuminate\Database\Eloquent\Model. Instantiate a new HasOne relationship.
- protected Illuminate\Database\Eloquent\Relations\MorphMany newMorphMany(Illuminate\Database\Eloquent\Builder $query, Illuminate\Database\Eloquent\Model $parent, string $type, string $id, string $localKey) - defined in Illuminate\Database\Eloquent\Model. Instantiate a new MorphMany relationship.
- protected Illuminate\Database\Eloquent\Relations\MorphOne newMorphOne(Illuminate\Database\Eloquent\Builder $query, Illuminate\Database\Eloquent\Model $parent, string $type, string $id, string $localKey) - defined in Illuminate\Database\Eloquent\Model. Instantiate a new MorphOne relationship.
- protected Illuminate\Database\Eloquent\Relations\MorphTo newMorphTo(Illuminate\Database\Eloquent\Builder $query, Illuminate\Database\Eloquent\Model $parent, string $foreignKey, string $ownerKey, string $type, string $relation) - defined in Illuminate\Database\Eloquent\Model. Instantiate a new MorphTo relationship.
- protected Illuminate\Database\Eloquent\Relations\MorphToMany newMorphToMany(Illuminate\Database\Eloquent\Builder $query, Illuminate\Database\Eloquent\Model $parent, string $name, string $table, string $foreignPivotKey, string $relatedPivotKey, string $parentKey, string $relatedKey, string $relationName=NULL, bool $inverse=false) - defined in Illuminate\Database\Eloquent\Model. Instantiate a new HasManyThrough relationship.
- protected mixed newRelatedInstance(string $class) - defined in Illuminate\Database\Eloquent\Model. Create a new model instance for a related model.
- protected bool originalIsEquivalent(string $key, mixed $current) - defined in Illuminate\Database\Eloquent\Model. Determine if the new and old values for a given key are equivalent.
- protected bool performInsert(Illuminate\Database\Eloquent\Builder $query) - defined in Illuminate\Database\Eloquent\Model. Perform a model insert operation.
- protected bool performUpdate(Illuminate\Database\Eloquent\Builder $query) - defined in Illuminate\Database\Eloquent\Model. Perform a model update operation.
- protected static void registerModelEvent(string $event, Closure|string $callback) - defined in Illuminate\Database\Eloquent\Model. Register a model event with the dispatcher.
- protected string removeTableFromKey(string $key) - defined in Illuminate\Database\Eloquent\Model. Remove the table name from a given key.
- protected string serializeDate(DateTimeInterface $date) - defined in Illuminate\Database\Eloquent\Model. Prepare a date for array / JSON serialization.
- protected Illuminate\Database\Eloquent\Builder setKeysForSaveQuery(Illuminate\Database\Eloquent\Builder $query) - defined in Illuminate\Database\Eloquent\Model. Set the keys for a save update query.
- protected void updateTimestamps() - defined in Illuminate\Database\Eloquent\Model. Update the creation and update timestamps.