PHP 클래스 Illuminate\Database\Eloquent\Model

상속: implements ArrayAcces\ArrayAccess, implements Illuminate\Contracts\Support\Arrayable, implements Illuminate\Contracts\Support\Jsonable, implements JsonSerializabl\JsonSerializable, implements Illuminate\Contracts\Queue\QueueableEntity, implements Illuminate\Contracts\Routing\UrlRoutable
파일 보기 프로젝트 열기: illuminate/database 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$exists boolean Indicates if the model exists.
$incrementing boolean Indicates if the IDs are auto-incrementing.
$manyMethods array The many to many relationship methods.
$snakeAttributes boolean Indicates whether attributes are snake cased on arrays.
$timestamps boolean Indicates if the model should be timestamped.
$wasRecentlyCreated boolean Indicates if the model was inserted during the current request lifecycle.

보호된 프로퍼티들

프로퍼티 타입 설명
$appends array The accessors to append to the model's array form.
$attributes array The model's attributes.
$booted array The array of booted models.
$casts array The attributes that should be cast to native types.
$connection string The connection name for the model.
$dateFormat string The storage format of the model's date columns.
$dates array The attributes that should be mutated to dates.
$dispatcher Illuminate\Contracts\Events\Dispatcher The event dispatcher instance.
$events array Allows for object-based events for native Eloquent events.
$fillable array The attributes that are mass assignable.
$globalScopes array The array of global scopes on the model.
$guarded array The attributes that aren't mass assignable.
$hidden array The attributes that should be hidden for arrays.
$keyType string The "type" of the auto-incrementing ID.
$mutatorCache array The cache of the mutated attributes for each class.
$observables array User exposed observable events.
$original array The model attribute's original state.
$perPage integer The number of models to return for pagination.
$primaryKey string The primary key for the model.
$relations array The loaded relationships for the model.
$resolver Illuminate\Database\ConnectionResolverInterface The connection resolver instance.
$table string The table associated with the model.
$touches array The relationships that should be touched on save.
$unguarded boolean Indicates if all mass assignment is enabled.
$visible array The attributes that should be visible in arrays.
$with array The relations to eager load on every query.

공개 메소드들

메소드 설명
__call ( string $method, array $parameters ) : mixed Handle dynamic method calls into the model.
__callStatic ( string $method, array $parameters ) : mixed Handle dynamic static method calls into the method.
__construct ( array $attributes = [] ) : void Create a new Eloquent model instance.
__get ( string $key ) : mixed Dynamically retrieve attributes on the model.
__isset ( string $key ) : boolean Determine if an attribute or relation exists on the model.
__set ( string $key, mixed $value ) : void Dynamically set attributes on the model.
__toString ( ) : string Convert the model to its string representation.
__unset ( string $key ) : void Unset an attribute on the model.
__wakeup ( ) : void When a model is being unserialized, check if it needs to be booted.
addGlobalScope ( Illuminate\Database\Eloquent\Scope | Closure | string $scope, Closur\Closure $implementation = null ) : mixed Register a new global scope on the model.
addHidden ( array | string | null $attributes = null ) : void Add hidden attributes for the model.
addObservableEvents ( array | mixed $observables ) : void Add an observable event name.
addVisible ( array | string | null $attributes = null ) : void Add visible attributes for the model.
all ( array | mixed $columns = ['*'] ) : Illuminate\Database\Eloquent\Collection | static[] Get all of the models from the database.
append ( array | string $attributes ) Append attributes to query when building a query.
attributesToArray ( ) : array Convert the model's attributes to an array.
belongsTo ( string $related, string $foreignKey = null, string $otherKey = null, string $relation = null ) : BelongsTo Define an inverse one-to-one or many relationship.
belongsToMany ( string $related, string $table = null, string $foreignKey = null, string $otherKey = null, string $relation = null ) : Illuminate\Database\Eloquent\Relations\BelongsToMany Define a many-to-many relationship.
cacheMutatedAttributes ( string $class ) : void Extract and cache all the mutated attributes of a class.
clearBootedModels ( ) : void Clear the list of booted models so they will be re-booted.
create ( array $attributes = [] ) : static Save a new model and return the instance.
created ( Closure | string $callback, integer $priority ) : void Register a created model event with the dispatcher.
creating ( Closure | string $callback, integer $priority ) : void Register a creating model event with the dispatcher.
delete ( ) : boolean | null Delete the model from the database.
deleted ( Closure | string $callback, integer $priority ) : void Register a deleted model event with the dispatcher.
deleting ( Closure | string $callback, integer $priority ) : void Register a deleting model event with the dispatcher.
destroy ( array | integer $ids ) : integer Destroy the models for the given IDs.
fill ( array $attributes ) Fill the model with an array of attributes.
fillJsonAttribute ( string $key, mixed $value ) Set a given JSON attribute on the model.
fillable ( array $fillable ) Set the fillable attributes for the model.
flushEventListeners ( ) : void Remove all of the event listeners for the model.
forceCreate ( array $attributes ) : static Save a new model and return the instance. Allow mass-assignment.
forceDelete ( ) : boolean | null Force a hard delete on a soft deleted model.
forceFill ( array $attributes ) Fill the model with an array of attributes. Force mass assignment.
fresh ( array | string $with = [] ) : static | null Reload a fresh model instance from the database.
freshTimestamp ( ) : Carbon\Carbon Get a fresh timestamp for the model.
freshTimestampString ( ) : string Get a fresh timestamp for the model.
fromDateTime ( DateTime | integer $value ) : string Convert a DateTime to a storable string.
fromJson ( string $value, boolean $asObject = false ) : mixed Decode the given JSON back into an array or object.
getActualClassNameForMorph ( string $class ) : string Retrieve the fully qualified class name from a slug.
getAttribute ( string $key ) : mixed Get an attribute from the model.
getAttributeValue ( string $key ) : mixed Get a plain attribute (not a relationship).
getAttributes ( ) : array Get all of the current attributes on the model.
getCasts ( ) : array Get the casts array.
getConnection ( ) : Connection Get the database connection for the model.
getConnectionName ( ) : string Get the current connection name for the model.
getConnectionResolver ( ) : Illuminate\Database\ConnectionResolverInterface Get the connection resolver instance.
getCreatedAtColumn ( ) : string Get the name of the "created at" column.
getDates ( ) : array Get the attributes that should be converted to dates.
getDirty ( ) : array Get the attributes that have been changed since last sync.
getEventDispatcher ( ) : Illuminate\Contracts\Events\Dispatcher Get the event dispatcher instance.
getFillable ( ) : array Get the fillable attributes for the model.
getForeignKey ( ) : string Get the default foreign key name for the model.
getGlobalScope ( Illuminate\Database\Eloquent\Scope | string $scope ) : Illuminate\Database\Eloquent\Scope | Closure | null Get a global scope registered with the model.
getGlobalScopes ( ) : array Get the global scopes for this class instance.
getGuarded ( ) : array Get the guarded attributes for the model.
getHidden ( ) : array Get the hidden attributes for the model.
getIncrementing ( ) : boolean Get the value indicating whether the IDs are incrementing.
getKey ( ) : mixed Get the value of the model's primary key.
getKeyName ( ) : string Get the primary key for the model.
getKeyType ( ) : string Get the auto incrementing key type.
getMorphClass ( ) : string Get the class name for polymorphic relations.
getMutatedAttributes ( ) : array Get the mutated attributes for a given instance.
getObservableEvents ( ) : array Get the observable event names.
getOriginal ( string | null $key = null, mixed $default = null ) : mixed | array Get the model's original attribute values.
getPerPage ( ) : integer Get the number of models to return per page.
getQualifiedKeyName ( ) : string Get the table qualified key name.
getQueueableId ( ) : mixed Get the queueable identity for the entity.
getRelation ( string $relation ) : mixed Get a specified relationship.
getRelationValue ( string $key ) : mixed Get a relationship.
getRelations ( ) : array Get all the loaded relations for the instance.
getRouteKey ( ) : mixed Get the value of the model's route key.
getRouteKeyName ( ) : string Get the route key for the model.
getTable ( ) : string Get the table associated with the model.
getTouchedRelations ( ) : array Get the relationships that are touched on save.
getUpdatedAtColumn ( ) : string Get the name of the "updated at" column.
getVisible ( ) : array Get the visible attributes for the model.
guard ( array $guarded ) Set the guarded attributes for the model.
hasCast ( string $key, array | string | null $types = null ) : boolean Determine whether an attribute should be cast to a native type.
hasGetMutator ( string $key ) : boolean Determine if a get mutator exists for an attribute.
hasGlobalScope ( Illuminate\Database\Eloquent\Scope | string $scope ) : boolean Determine if a model has a global scope.
hasMany ( string $related, string $foreignKey = null, string $localKey = null ) : Illuminate\Database\Eloquent\Relations\HasMany Define a one-to-many relationship.
hasManyThrough ( string $related, string $through, string | null $firstKey = null, string | null $secondKey = null, string | null $localKey = null ) : Illuminate\Database\Eloquent\Relations\HasManyThrough Define a has-many-through relationship.
hasOne ( string $related, string $foreignKey = null, string $localKey = null ) : Illuminate\Database\Eloquent\Relations\HasOne Define a one-to-one relationship.
hasSetMutator ( string $key ) : boolean Determine if a set mutator exists for an attribute.
hydrate ( array $items, string | null $connection = null ) : Illuminate\Database\Eloquent\Collection Create a collection of models from plain arrays.
hydrateRaw ( string $query, array $bindings = [], string | null $connection = null ) : Illuminate\Database\Eloquent\Collection Create a collection of models from a raw query.
is ( Model $model ) : boolean Determine if two models have the same ID and belong to the same table.
isClean ( array | string | null $attributes = null ) : boolean Determine if the model or given attribute(s) have remained the same.
isDirty ( array | string | null $attributes = null ) : boolean Determine if the model or given attribute(s) have been modified.
isFillable ( string $key ) : boolean Determine if the given attribute may be mass assigned.
isGuarded ( string $key ) : boolean Determine if the given key is guarded.
isUnguarded ( ) : boolean Determine if current state is "unguarded".
joiningTable ( string $related ) : string Get the joining table name for a many-to-many relation.
jsonSerialize ( ) : array Convert the object into something JSON serializable.
load ( array | string $relations ) Eager load relations on the model.
makeHidden ( array | string $attributes ) Make the given, typically visible, attributes hidden.
makeVisible ( array | string $attributes ) Make the given, typically hidden, attributes visible.
morphMany ( string $related, string $name, string $type = null, string $id = null, string $localKey = null ) : Illuminate\Database\Eloquent\Relations\MorphMany Define a polymorphic one-to-many relationship.
morphOne ( string $related, string $name, string $type = null, string $id = null, string $localKey = null ) : Illuminate\Database\Eloquent\Relations\MorphOne Define a polymorphic one-to-one relationship.
morphTo ( string $name = null, string $type = null, string $id = null ) : Illuminate\Database\Eloquent\Relations\MorphTo Define a polymorphic, inverse one-to-one or many relationship.
morphToMany ( string $related, string $name, string $table = null, string $foreignKey = null, string $otherKey = null, boolean $inverse = false ) : Illuminate\Database\Eloquent\Relations\MorphToMany Define a polymorphic many-to-many relationship.
morphedByMany ( string $related, string $name, string $table = null, string $foreignKey = null, string $otherKey = null ) : Illuminate\Database\Eloquent\Relations\MorphToMany Define a polymorphic, inverse many-to-many relationship.
newCollection ( array $models = [] ) : Illuminate\Database\Eloquent\Collection Create a new Eloquent Collection instance.
newEloquentBuilder ( Builder $query ) : Builder | static Create a new Eloquent query builder for the model.
newFromBuilder ( array $attributes = [], string | null $connection = null ) : static Create a new model instance that is existing.
newInstance ( array $attributes = [], boolean $exists = false ) : static Create a new instance of the given model.
newPivot ( Model $parent, array $attributes, string $table, boolean $exists, string | null $using = null ) : Illuminate\Database\Eloquent\Relations\Pivot Create a new pivot model instance.
newQuery ( ) : Builder Get a new query builder for the model's table.
newQueryWithoutScope ( Illuminate\Database\Eloquent\Scope | string $scope ) : Builder Get a new query instance without a given scope.
newQueryWithoutScopes ( ) : Builder | static Get a new query builder that doesn't have any global scopes.
observe ( object | string $class, integer $priority ) : void Register an observer with the Model.
offsetExists ( mixed $offset ) : boolean Determine if the given attribute exists.
offsetGet ( mixed $offset ) : mixed Get the value for a given offset.
offsetSet ( mixed $offset, mixed $value ) : void Set the value for a given offset.
offsetUnset ( mixed $offset ) : void Unset the value for a given offset.
on ( string | null $connection = null ) : Builder Begin querying the model on a given connection.
onWriteConnection ( ) : Builder Begin querying the model on the write connection.
push ( ) : boolean Save the model and all of its relationships.
query ( ) : Builder Begin querying the model.
reguard ( ) : void Enable the mass assignment restrictions.
relationLoaded ( string $key ) : boolean Determine if the given relation is loaded.
relationsToArray ( ) : array Get the model's relationships in array form.
removeObservableEvents ( array | mixed $observables ) : void Remove an observable event name.
replicate ( array $except = null ) : Model Clone the model into a new, non-existing instance.
resolveConnection ( string | null $connection = null ) : Connection Resolve a connection instance.
save ( array $options = [] ) : boolean Save the model to the database.
saveOrFail ( array $options = [] ) : boolean Save the model to the database using transaction.
saved ( Closure | string $callback, integer $priority ) : void Register a saved model event with the dispatcher.
saving ( Closure | string $callback, integer $priority ) : void Register a saving model event with the dispatcher.
setAppends ( array $appends ) Set the accessors to append to model arrays.
setAttribute ( string $key, mixed $value ) Set a given attribute on the model.
setConnection ( string $name ) Set the connection associated with the model.
setConnectionResolver ( Illuminate\Database\ConnectionResolverInterface $resolver ) : void Set the connection resolver instance.
setCreatedAt ( mixed $value ) Set the value of the "created at" attribute.
setDateFormat ( string $format ) Set the date format used by the model.
setEventDispatcher ( Illuminate\Contracts\Events\Dispatcher $dispatcher ) : void Set the event dispatcher instance.
setHidden ( array $hidden ) Set the hidden attributes for the model.
setIncrementing ( boolean $value ) Set whether IDs are incrementing.
setKeyName ( string $key ) Set the primary key for the model.
setObservableEvents ( array $observables ) Set the observable event names.
setPerPage ( integer $perPage ) Set the number of models to return per page.
setRawAttributes ( array $attributes, boolean $sync = false ) Set the array of model attributes. No checking is done.
setRelation ( string $relation, mixed $value ) Set the specific relationship in the model.
setRelations ( array $relations ) Set the entire relations array on the model.
setTable ( string $table ) Set the table associated with the model.
setTouchedRelations ( array $touches ) Set the relationships that are touched on save.
setUpdatedAt ( mixed $value ) Set the value of the "updated at" attribute.
setVisible ( array $visible ) Set the visible attributes for the model.
syncOriginal ( ) Sync the original attributes with the current.
syncOriginalAttribute ( string $attribute ) Sync a single original attribute with its current value.
toArray ( ) : array Convert the model instance to an array.
toJson ( integer $options ) : string Convert the model instance to JSON.
totallyGuarded ( ) : boolean Determine if the model is totally guarded.
touch ( ) : boolean Update the model's update timestamp.
touchOwners ( ) : void Touch the owning relations of the model.
touches ( string $relation ) : boolean Determine if the model touches a given relation.
unguard ( boolean $state = true ) : void Disable all mass assignable restrictions.
unguarded ( callable $callback ) : mixed Run the given callable while being unguarded.
unsetConnectionResolver ( ) : void Unset the connection resolver for models.
unsetEventDispatcher ( ) : void Unset the event dispatcher for models.
update ( array $attributes = [], array $options = [] ) : boolean Update the model in the database.
updated ( Closure | string $callback, integer $priority ) : void Register an updated model event with the dispatcher.
updating ( Closure | string $callback, integer $priority ) : void Register an updating model event with the dispatcher.
usesTimestamps ( ) : boolean Determine if the model uses timestamps.
with ( array | string $relations ) : Builder | static Begin querying a model with eager loading.

보호된 메소드들

메소드 설명
asDateTime ( mixed $value ) : Carbon\Carbon Return a timestamp as DateTime object.
asJson ( mixed $value ) : string Encode the given value as JSON.
asTimeStamp ( mixed $value ) : integer Return a timestamp as unix timestamp.
boot ( ) : void The "booting" method of the model.
bootIfNotBooted ( ) : void Check if the model needs to be booted and if so, do it.
bootTraits ( ) : void Boot all of the bootable traits on the model.
castAttribute ( string $key, mixed $value ) : mixed Cast an attribute to a native PHP type.
decrement ( string $column, integer $amount = 1, array $extra = [] ) : integer Decrement a column's value by a given amount.
fillableFromArray ( array $attributes ) : array Get the fillable attributes of a given array.
finishSave ( array $options ) : void Finish processing on a successful save operation.
fireModelEvent ( string $event, boolean $halt = true ) : mixed Fire the given event for the model.
getArrayableAppends ( ) : array Get all of the appendable values that are arrayable.
getArrayableAttributes ( ) : array Get an attribute array of all arrayable attributes.
getArrayableItems ( array $values ) : array Get an attribute array of all arrayable values.
getArrayableRelations ( ) : array Get an attribute array of all arrayable relations.
getAttributeFromArray ( string $key ) : mixed Get an attribute from the $attributes array.
getBelongsToManyCaller ( ) : string Get the relationship name of the belongs to many.
getCastType ( string $key ) : string Get the type of cast for a model attribute.
getDateFormat ( ) : string Get the format for database stored dates.
getKeyForSaveQuery ( ) : mixed Get the primary key value for a save query.
getMorphs ( string $name, string $type, string $id ) : array Get the polymorphic relationship columns.
getRelationshipFromMethod ( string $method ) : mixed Get a relationship value from a method.
increment ( string $column, integer $amount = 1, array $extra = [] ) : integer Increment a column's value by a given amount.
incrementOrDecrement ( string $column, integer $amount, array $extra, string $method ) : integer Run the increment or decrement method on the model.
incrementOrDecrementAttributeValue ( string $column, integer $amount, string $method ) : void Increment the underlying attribute value and sync with original.
insertAndSetId ( Builder $query, array $attributes ) : void Insert the given attributes and set the ID on the model.
isDateCastable ( string $key ) : boolean Determine whether a value is Date / DateTime castable for inbound manipulation.
isJsonCastable ( string $key ) : boolean Determine whether a value is JSON castable for inbound manipulation.
mutateAttribute ( string $key, mixed $value ) : mixed Get the value of an attribute using its mutator.
mutateAttributeForArray ( string $key, mixed $value ) : mixed Get the value of an attribute using its mutator for array conversion.
newBaseQueryBuilder ( ) : Builder Get a new query builder instance for the connection.
originalIsNumericallyEquivalent ( string $key ) : boolean Determine if the new and old values for a given key are numerically equivalent.
performDeleteOnModel ( ) : void Perform the actual delete query on this model instance.
performInsert ( Builder $query ) : boolean Perform a model insert operation.
performUpdate ( Builder $query, array $options = [] ) : boolean Perform a model update operation.
registerModelEvent ( string $event, Closure | string $callback, integer $priority ) : void Register a model event with the dispatcher.
removeTableFromKey ( string $key ) : string Remove the table name from a given key.
serializeDate ( DateTimeInterfac\DateTimeInterface $date ) : string Prepare a date for array / JSON serialization.
setKeysForSaveQuery ( Builder $query ) : Builder Set the keys for a save update query.
updateTimestamps ( ) : void Update the creation and update timestamps.

메소드 상세

__call() 공개 메소드

Handle dynamic method calls into the model.
public __call ( string $method, array $parameters ) : mixed
$method string
$parameters array
리턴 mixed

__callStatic() 공개 정적인 메소드

Handle dynamic static method calls into the method.
public static __callStatic ( string $method, array $parameters ) : mixed
$method string
$parameters array
리턴 mixed

__construct() 공개 메소드

Create a new Eloquent model instance.
public __construct ( array $attributes = [] ) : void
$attributes array
리턴 void

__get() 공개 메소드

Dynamically retrieve attributes on the model.
public __get ( string $key ) : mixed
$key string
리턴 mixed

__isset() 공개 메소드

Determine if an attribute or relation exists on the model.
public __isset ( string $key ) : boolean
$key string
리턴 boolean

__set() 공개 메소드

Dynamically set attributes on the model.
public __set ( string $key, mixed $value ) : void
$key string
$value mixed
리턴 void

__toString() 공개 메소드

Convert the model to its string representation.
public __toString ( ) : string
리턴 string

__unset() 공개 메소드

Unset an attribute on the model.
public __unset ( string $key ) : void
$key string
리턴 void

__wakeup() 공개 메소드

When a model is being unserialized, check if it needs to be booted.
public __wakeup ( ) : void
리턴 void

addGlobalScope() 공개 정적인 메소드

Register a new global scope on the model.
public static addGlobalScope ( Illuminate\Database\Eloquent\Scope | Closure | string $scope, Closur\Closure $implementation = null ) : mixed
$scope Illuminate\Database\Eloquent\Scope | Closure | string
$implementation Closur\Closure
리턴 mixed

addHidden() 공개 메소드

Add hidden attributes for the model.
public addHidden ( array | string | null $attributes = null ) : void
$attributes array | string | null
리턴 void

addObservableEvents() 공개 메소드

Add an observable event name.
public addObservableEvents ( array | mixed $observables ) : void
$observables array | mixed
리턴 void

addVisible() 공개 메소드

Add visible attributes for the model.
public addVisible ( array | string | null $attributes = null ) : void
$attributes array | string | null
리턴 void

all() 공개 정적인 메소드

Get all of the models from the database.
public static all ( array | mixed $columns = ['*'] ) : Illuminate\Database\Eloquent\Collection | static[]
$columns array | mixed
리턴 Illuminate\Database\Eloquent\Collection | static[]

append() 공개 메소드

Append attributes to query when building a query.
public append ( array | string $attributes )
$attributes array | string

asDateTime() 보호된 메소드

Return a timestamp as DateTime object.
protected asDateTime ( mixed $value ) : Carbon\Carbon
$value mixed
리턴 Carbon\Carbon

asJson() 보호된 메소드

Encode the given value as JSON.
protected asJson ( mixed $value ) : string
$value mixed
리턴 string

asTimeStamp() 보호된 메소드

Return a timestamp as unix timestamp.
protected asTimeStamp ( mixed $value ) : integer
$value mixed
리턴 integer

attributesToArray() 공개 메소드

Convert the model's attributes to an array.
public attributesToArray ( ) : array
리턴 array

belongsTo() 공개 메소드

Define an inverse one-to-one or many relationship.
public belongsTo ( string $related, string $foreignKey = null, string $otherKey = null, string $relation = null ) : BelongsTo
$related string
$foreignKey string
$otherKey string
$relation string
리턴 Illuminate\Database\Eloquent\Relations\BelongsTo

belongsToMany() 공개 메소드

Define a many-to-many relationship.
public belongsToMany ( string $related, string $table = null, string $foreignKey = null, string $otherKey = null, string $relation = null ) : Illuminate\Database\Eloquent\Relations\BelongsToMany
$related string
$table string
$foreignKey string
$otherKey string
$relation string
리턴 Illuminate\Database\Eloquent\Relations\BelongsToMany

boot() 보호된 정적인 메소드

The "booting" method of the model.
protected static boot ( ) : void
리턴 void

bootIfNotBooted() 보호된 메소드

Check if the model needs to be booted and if so, do it.
protected bootIfNotBooted ( ) : void
리턴 void

bootTraits() 보호된 정적인 메소드

Boot all of the bootable traits on the model.
protected static bootTraits ( ) : void
리턴 void

cacheMutatedAttributes() 공개 정적인 메소드

Extract and cache all the mutated attributes of a class.
public static cacheMutatedAttributes ( string $class ) : void
$class string
리턴 void

castAttribute() 보호된 메소드

Cast an attribute to a native PHP type.
protected castAttribute ( string $key, mixed $value ) : mixed
$key string
$value mixed
리턴 mixed

clearBootedModels() 공개 정적인 메소드

Clear the list of booted models so they will be re-booted.
public static clearBootedModels ( ) : void
리턴 void

create() 공개 정적인 메소드

Save a new model and return the instance.
public static create ( array $attributes = [] ) : static
$attributes array
리턴 static

created() 공개 정적인 메소드

Register a created model event with the dispatcher.
public static created ( Closure | string $callback, integer $priority ) : void
$callback Closure | string
$priority integer
리턴 void

creating() 공개 정적인 메소드

Register a creating model event with the dispatcher.
public static creating ( Closure | string $callback, integer $priority ) : void
$callback Closure | string
$priority integer
리턴 void

decrement() 보호된 메소드

Decrement a column's value by a given amount.
protected decrement ( string $column, integer $amount = 1, array $extra = [] ) : integer
$column string
$amount integer
$extra array
리턴 integer

delete() 공개 메소드

Delete the model from the database.
public delete ( ) : boolean | null
리턴 boolean | null

deleted() 공개 정적인 메소드

Register a deleted model event with the dispatcher.
public static deleted ( Closure | string $callback, integer $priority ) : void
$callback Closure | string
$priority integer
리턴 void

deleting() 공개 정적인 메소드

Register a deleting model event with the dispatcher.
public static deleting ( Closure | string $callback, integer $priority ) : void
$callback Closure | string
$priority integer
리턴 void

destroy() 공개 정적인 메소드

Destroy the models for the given IDs.
public static destroy ( array | integer $ids ) : integer
$ids array | integer
리턴 integer

fill() 공개 메소드

Fill the model with an array of attributes.
public fill ( array $attributes )
$attributes array

fillJsonAttribute() 공개 메소드

Set a given JSON attribute on the model.
public fillJsonAttribute ( string $key, mixed $value )
$key string
$value mixed

fillable() 공개 메소드

Set the fillable attributes for the model.
public fillable ( array $fillable )
$fillable array

fillableFromArray() 보호된 메소드

Get the fillable attributes of a given array.
protected fillableFromArray ( array $attributes ) : array
$attributes array
리턴 array

finishSave() 보호된 메소드

Finish processing on a successful save operation.
protected finishSave ( array $options ) : void
$options array
리턴 void

fireModelEvent() 보호된 메소드

Fire the given event for the model.
protected fireModelEvent ( string $event, boolean $halt = true ) : mixed
$event string
$halt boolean
리턴 mixed

flushEventListeners() 공개 정적인 메소드

Remove all of the event listeners for the model.
public static flushEventListeners ( ) : void
리턴 void

forceCreate() 공개 정적인 메소드

Save a new model and return the instance. Allow mass-assignment.
public static forceCreate ( array $attributes ) : static
$attributes array
리턴 static

forceDelete() 공개 메소드

This method protects developers from running forceDelete when trait is missing.
public forceDelete ( ) : boolean | null
리턴 boolean | null

forceFill() 공개 메소드

Fill the model with an array of attributes. Force mass assignment.
public forceFill ( array $attributes )
$attributes array

fresh() 공개 메소드

Reload a fresh model instance from the database.
public fresh ( array | string $with = [] ) : static | null
$with array | string
리턴 static | null

freshTimestamp() 공개 메소드

Get a fresh timestamp for the model.
public freshTimestamp ( ) : Carbon\Carbon
리턴 Carbon\Carbon

freshTimestampString() 공개 메소드

Get a fresh timestamp for the model.
public freshTimestampString ( ) : string
리턴 string

fromDateTime() 공개 메소드

Convert a DateTime to a storable string.
public fromDateTime ( DateTime | integer $value ) : string
$value DateTime | integer
리턴 string

fromJson() 공개 메소드

Decode the given JSON back into an array or object.
public fromJson ( string $value, boolean $asObject = false ) : mixed
$value string
$asObject boolean
리턴 mixed

getActualClassNameForMorph() 공개 메소드

Retrieve the fully qualified class name from a slug.
public getActualClassNameForMorph ( string $class ) : string
$class string
리턴 string

getArrayableAppends() 보호된 메소드

Get all of the appendable values that are arrayable.
protected getArrayableAppends ( ) : array
리턴 array

getArrayableAttributes() 보호된 메소드

Get an attribute array of all arrayable attributes.
protected getArrayableAttributes ( ) : array
리턴 array

getArrayableItems() 보호된 메소드

Get an attribute array of all arrayable values.
protected getArrayableItems ( array $values ) : array
$values array
리턴 array

getArrayableRelations() 보호된 메소드

Get an attribute array of all arrayable relations.
protected getArrayableRelations ( ) : array
리턴 array

getAttribute() 공개 메소드

Get an attribute from the model.
public getAttribute ( string $key ) : mixed
$key string
리턴 mixed

getAttributeFromArray() 보호된 메소드

Get an attribute from the $attributes array.
protected getAttributeFromArray ( string $key ) : mixed
$key string
리턴 mixed

getAttributeValue() 공개 메소드

Get a plain attribute (not a relationship).
public getAttributeValue ( string $key ) : mixed
$key string
리턴 mixed

getAttributes() 공개 메소드

Get all of the current attributes on the model.
public getAttributes ( ) : array
리턴 array

getBelongsToManyCaller() 보호된 메소드

Get the relationship name of the belongs to many.
protected getBelongsToManyCaller ( ) : string
리턴 string

getCastType() 보호된 메소드

Get the type of cast for a model attribute.
protected getCastType ( string $key ) : string
$key string
리턴 string

getCasts() 공개 메소드

Get the casts array.
public getCasts ( ) : array
리턴 array

getConnection() 공개 메소드

Get the database connection for the model.
public getConnection ( ) : Connection
리턴 Illuminate\Database\Connection

getConnectionName() 공개 메소드

Get the current connection name for the model.
public getConnectionName ( ) : string
리턴 string

getConnectionResolver() 공개 정적인 메소드

Get the connection resolver instance.
public static getConnectionResolver ( ) : Illuminate\Database\ConnectionResolverInterface
리턴 Illuminate\Database\ConnectionResolverInterface

getCreatedAtColumn() 공개 메소드

Get the name of the "created at" column.
public getCreatedAtColumn ( ) : string
리턴 string

getDateFormat() 보호된 메소드

Get the format for database stored dates.
protected getDateFormat ( ) : string
리턴 string

getDates() 공개 메소드

Get the attributes that should be converted to dates.
public getDates ( ) : array
리턴 array

getDirty() 공개 메소드

Get the attributes that have been changed since last sync.
public getDirty ( ) : array
리턴 array

getEventDispatcher() 공개 정적인 메소드

Get the event dispatcher instance.
public static getEventDispatcher ( ) : Illuminate\Contracts\Events\Dispatcher
리턴 Illuminate\Contracts\Events\Dispatcher

getFillable() 공개 메소드

Get the fillable attributes for the model.
public getFillable ( ) : array
리턴 array

getForeignKey() 공개 메소드

Get the default foreign key name for the model.
public getForeignKey ( ) : string
리턴 string

getGlobalScope() 공개 정적인 메소드

Get a global scope registered with the model.
public static getGlobalScope ( Illuminate\Database\Eloquent\Scope | string $scope ) : Illuminate\Database\Eloquent\Scope | Closure | null
$scope Illuminate\Database\Eloquent\Scope | string
리턴 Illuminate\Database\Eloquent\Scope | Closure | null

getGlobalScopes() 공개 메소드

Get the global scopes for this class instance.
public getGlobalScopes ( ) : array
리턴 array

getGuarded() 공개 메소드

Get the guarded attributes for the model.
public getGuarded ( ) : array
리턴 array

getHidden() 공개 메소드

Get the hidden attributes for the model.
public getHidden ( ) : array
리턴 array

getIncrementing() 공개 메소드

Get the value indicating whether the IDs are incrementing.
public getIncrementing ( ) : boolean
리턴 boolean

getKey() 공개 메소드

Get the value of the model's primary key.
public getKey ( ) : mixed
리턴 mixed

getKeyForSaveQuery() 보호된 메소드

Get the primary key value for a save query.
protected getKeyForSaveQuery ( ) : mixed
리턴 mixed

getKeyName() 공개 메소드

Get the primary key for the model.
public getKeyName ( ) : string
리턴 string

getKeyType() 공개 메소드

Get the auto incrementing key type.
public getKeyType ( ) : string
리턴 string

getMorphClass() 공개 메소드

Get the class name for polymorphic relations.
public getMorphClass ( ) : string
리턴 string

getMorphs() 보호된 메소드

Get the polymorphic relationship columns.
protected getMorphs ( string $name, string $type, string $id ) : array
$name string
$type string
$id string
리턴 array

getMutatedAttributes() 공개 메소드

Get the mutated attributes for a given instance.
public getMutatedAttributes ( ) : array
리턴 array

getObservableEvents() 공개 메소드

Get the observable event names.
public getObservableEvents ( ) : array
리턴 array

getOriginal() 공개 메소드

Get the model's original attribute values.
public getOriginal ( string | null $key = null, mixed $default = null ) : mixed | array
$key string | null
$default mixed
리턴 mixed | array

getPerPage() 공개 메소드

Get the number of models to return per page.
public getPerPage ( ) : integer
리턴 integer

getQualifiedKeyName() 공개 메소드

Get the table qualified key name.
public getQualifiedKeyName ( ) : string
리턴 string

getQueueableId() 공개 메소드

Get the queueable identity for the entity.
public getQueueableId ( ) : mixed
리턴 mixed

getRelation() 공개 메소드

Get a specified relationship.
public getRelation ( string $relation ) : mixed
$relation string
리턴 mixed

getRelationValue() 공개 메소드

Get a relationship.
public getRelationValue ( string $key ) : mixed
$key string
리턴 mixed

getRelations() 공개 메소드

Get all the loaded relations for the instance.
public getRelations ( ) : array
리턴 array

getRelationshipFromMethod() 보호된 메소드

Get a relationship value from a method.
protected getRelationshipFromMethod ( string $method ) : mixed
$method string
리턴 mixed

getRouteKey() 공개 메소드

Get the value of the model's route key.
public getRouteKey ( ) : mixed
리턴 mixed

getRouteKeyName() 공개 메소드

Get the route key for the model.
public getRouteKeyName ( ) : string
리턴 string

getTable() 공개 메소드

Get the table associated with the model.
public getTable ( ) : string
리턴 string

getTouchedRelations() 공개 메소드

Get the relationships that are touched on save.
public getTouchedRelations ( ) : array
리턴 array

getUpdatedAtColumn() 공개 메소드

Get the name of the "updated at" column.
public getUpdatedAtColumn ( ) : string
리턴 string

getVisible() 공개 메소드

Get the visible attributes for the model.
public getVisible ( ) : array
리턴 array

guard() 공개 메소드

Set the guarded attributes for the model.
public guard ( array $guarded )
$guarded array

hasCast() 공개 메소드

Determine whether an attribute should be cast to a native type.
public hasCast ( string $key, array | string | null $types = null ) : boolean
$key string
$types array | string | null
리턴 boolean

hasGetMutator() 공개 메소드

Determine if a get mutator exists for an attribute.
public hasGetMutator ( string $key ) : boolean
$key string
리턴 boolean

hasGlobalScope() 공개 정적인 메소드

Determine if a model has a global scope.
public static hasGlobalScope ( Illuminate\Database\Eloquent\Scope | string $scope ) : boolean
$scope Illuminate\Database\Eloquent\Scope | string
리턴 boolean

hasMany() 공개 메소드

Define a one-to-many relationship.
public hasMany ( string $related, string $foreignKey = null, string $localKey = null ) : Illuminate\Database\Eloquent\Relations\HasMany
$related string
$foreignKey string
$localKey string
리턴 Illuminate\Database\Eloquent\Relations\HasMany

hasManyThrough() 공개 메소드

Define a has-many-through relationship.
public hasManyThrough ( string $related, string $through, string | null $firstKey = null, string | null $secondKey = null, string | null $localKey = null ) : Illuminate\Database\Eloquent\Relations\HasManyThrough
$related string
$through string
$firstKey string | null
$secondKey string | null
$localKey string | null
리턴 Illuminate\Database\Eloquent\Relations\HasManyThrough

hasOne() 공개 메소드

Define a one-to-one relationship.
public hasOne ( string $related, string $foreignKey = null, string $localKey = null ) : Illuminate\Database\Eloquent\Relations\HasOne
$related string
$foreignKey string
$localKey string
리턴 Illuminate\Database\Eloquent\Relations\HasOne

hasSetMutator() 공개 메소드

Determine if a set mutator exists for an attribute.
public hasSetMutator ( string $key ) : boolean
$key string
리턴 boolean

hydrate() 공개 정적인 메소드

Create a collection of models from plain arrays.
public static hydrate ( array $items, string | null $connection = null ) : Illuminate\Database\Eloquent\Collection
$items array
$connection string | null
리턴 Illuminate\Database\Eloquent\Collection

hydrateRaw() 공개 정적인 메소드

Create a collection of models from a raw query.
public static hydrateRaw ( string $query, array $bindings = [], string | null $connection = null ) : Illuminate\Database\Eloquent\Collection
$query string
$bindings array
$connection string | null
리턴 Illuminate\Database\Eloquent\Collection

increment() 보호된 메소드

Increment a column's value by a given amount.
protected increment ( string $column, integer $amount = 1, array $extra = [] ) : integer
$column string
$amount integer
$extra array
리턴 integer

incrementOrDecrement() 보호된 메소드

Run the increment or decrement method on the model.
protected incrementOrDecrement ( string $column, integer $amount, array $extra, string $method ) : integer
$column string
$amount integer
$extra array
$method string
리턴 integer

incrementOrDecrementAttributeValue() 보호된 메소드

Increment the underlying attribute value and sync with original.
protected incrementOrDecrementAttributeValue ( string $column, integer $amount, string $method ) : void
$column string
$amount integer
$method string
리턴 void

insertAndSetId() 보호된 메소드

Insert the given attributes and set the ID on the model.
protected insertAndSetId ( Builder $query, array $attributes ) : void
$query Builder
$attributes array
리턴 void

is() 공개 메소드

Determine if two models have the same ID and belong to the same table.
public is ( Model $model ) : boolean
$model Model
리턴 boolean

isClean() 공개 메소드

Determine if the model or given attribute(s) have remained the same.
public isClean ( array | string | null $attributes = null ) : boolean
$attributes array | string | null
리턴 boolean

isDateCastable() 보호된 메소드

Determine whether a value is Date / DateTime castable for inbound manipulation.
protected isDateCastable ( string $key ) : boolean
$key string
리턴 boolean

isDirty() 공개 메소드

Determine if the model or given attribute(s) have been modified.
public isDirty ( array | string | null $attributes = null ) : boolean
$attributes array | string | null
리턴 boolean

isFillable() 공개 메소드

Determine if the given attribute may be mass assigned.
public isFillable ( string $key ) : boolean
$key string
리턴 boolean

isGuarded() 공개 메소드

Determine if the given key is guarded.
public isGuarded ( string $key ) : boolean
$key string
리턴 boolean

isJsonCastable() 보호된 메소드

Determine whether a value is JSON castable for inbound manipulation.
protected isJsonCastable ( string $key ) : boolean
$key string
리턴 boolean

isUnguarded() 공개 정적인 메소드

Determine if current state is "unguarded".
public static isUnguarded ( ) : boolean
리턴 boolean

joiningTable() 공개 메소드

Get the joining table name for a many-to-many relation.
public joiningTable ( string $related ) : string
$related string
리턴 string

jsonSerialize() 공개 메소드

Convert the object into something JSON serializable.
public jsonSerialize ( ) : array
리턴 array

load() 공개 메소드

Eager load relations on the model.
public load ( array | string $relations )
$relations array | string

makeHidden() 공개 메소드

Make the given, typically visible, attributes hidden.
public makeHidden ( array | string $attributes )
$attributes array | string

makeVisible() 공개 메소드

Make the given, typically hidden, attributes visible.
public makeVisible ( array | string $attributes )
$attributes array | string

morphMany() 공개 메소드

Define a polymorphic one-to-many relationship.
public morphMany ( string $related, string $name, string $type = null, string $id = null, string $localKey = null ) : Illuminate\Database\Eloquent\Relations\MorphMany
$related string
$name string
$type string
$id string
$localKey string
리턴 Illuminate\Database\Eloquent\Relations\MorphMany

morphOne() 공개 메소드

Define a polymorphic one-to-one relationship.
public morphOne ( string $related, string $name, string $type = null, string $id = null, string $localKey = null ) : Illuminate\Database\Eloquent\Relations\MorphOne
$related string
$name string
$type string
$id string
$localKey string
리턴 Illuminate\Database\Eloquent\Relations\MorphOne

morphTo() 공개 메소드

Define a polymorphic, inverse one-to-one or many relationship.
public morphTo ( string $name = null, string $type = null, string $id = null ) : Illuminate\Database\Eloquent\Relations\MorphTo
$name string
$type string
$id string
리턴 Illuminate\Database\Eloquent\Relations\MorphTo

morphToMany() 공개 메소드

Define a polymorphic many-to-many relationship.
public morphToMany ( string $related, string $name, string $table = null, string $foreignKey = null, string $otherKey = null, boolean $inverse = false ) : Illuminate\Database\Eloquent\Relations\MorphToMany
$related string
$name string
$table string
$foreignKey string
$otherKey string
$inverse boolean
리턴 Illuminate\Database\Eloquent\Relations\MorphToMany

morphedByMany() 공개 메소드

Define a polymorphic, inverse many-to-many relationship.
public morphedByMany ( string $related, string $name, string $table = null, string $foreignKey = null, string $otherKey = null ) : Illuminate\Database\Eloquent\Relations\MorphToMany
$related string
$name string
$table string
$foreignKey string
$otherKey string
리턴 Illuminate\Database\Eloquent\Relations\MorphToMany

mutateAttribute() 보호된 메소드

Get the value of an attribute using its mutator.
protected mutateAttribute ( string $key, mixed $value ) : mixed
$key string
$value mixed
리턴 mixed

mutateAttributeForArray() 보호된 메소드

Get the value of an attribute using its mutator for array conversion.
protected mutateAttributeForArray ( string $key, mixed $value ) : mixed
$key string
$value mixed
리턴 mixed

newBaseQueryBuilder() 보호된 메소드

Get a new query builder instance for the connection.
protected newBaseQueryBuilder ( ) : Builder
리턴 Illuminate\Database\Query\Builder

newCollection() 공개 메소드

Create a new Eloquent Collection instance.
public newCollection ( array $models = [] ) : Illuminate\Database\Eloquent\Collection
$models array
리턴 Illuminate\Database\Eloquent\Collection

newEloquentBuilder() 공개 메소드

Create a new Eloquent query builder for the model.
public newEloquentBuilder ( Builder $query ) : Builder | static
$query Illuminate\Database\Query\Builder
리턴 Builder | static

newFromBuilder() 공개 메소드

Create a new model instance that is existing.
public newFromBuilder ( array $attributes = [], string | null $connection = null ) : static
$attributes array
$connection string | null
리턴 static

newInstance() 공개 메소드

Create a new instance of the given model.
public newInstance ( array $attributes = [], boolean $exists = false ) : static
$attributes array
$exists boolean
리턴 static

newPivot() 공개 메소드

Create a new pivot model instance.
public newPivot ( Model $parent, array $attributes, string $table, boolean $exists, string | null $using = null ) : Illuminate\Database\Eloquent\Relations\Pivot
$parent Model
$attributes array
$table string
$exists boolean
$using string | null
리턴 Illuminate\Database\Eloquent\Relations\Pivot

newQuery() 공개 메소드

Get a new query builder for the model's table.
public newQuery ( ) : Builder
리턴 Builder

newQueryWithoutScope() 공개 메소드

Get a new query instance without a given scope.
public newQueryWithoutScope ( Illuminate\Database\Eloquent\Scope | string $scope ) : Builder
$scope Illuminate\Database\Eloquent\Scope | string
리턴 Builder

newQueryWithoutScopes() 공개 메소드

Get a new query builder that doesn't have any global scopes.
public newQueryWithoutScopes ( ) : Builder | static
리턴 Builder | static

observe() 공개 정적인 메소드

Register an observer with the Model.
public static observe ( object | string $class, integer $priority ) : void
$class object | string
$priority integer
리턴 void

offsetExists() 공개 메소드

Determine if the given attribute exists.
public offsetExists ( mixed $offset ) : boolean
$offset mixed
리턴 boolean

offsetGet() 공개 메소드

Get the value for a given offset.
public offsetGet ( mixed $offset ) : mixed
$offset mixed
리턴 mixed

offsetSet() 공개 메소드

Set the value for a given offset.
public offsetSet ( mixed $offset, mixed $value ) : void
$offset mixed
$value mixed
리턴 void

offsetUnset() 공개 메소드

Unset the value for a given offset.
public offsetUnset ( mixed $offset ) : void
$offset mixed
리턴 void

on() 공개 정적인 메소드

Begin querying the model on a given connection.
public static on ( string | null $connection = null ) : Builder
$connection string | null
리턴 Builder

onWriteConnection() 공개 정적인 메소드

Begin querying the model on the write connection.
public static onWriteConnection ( ) : Builder
리턴 Illuminate\Database\Query\Builder

originalIsNumericallyEquivalent() 보호된 메소드

Determine if the new and old values for a given key are numerically equivalent.
protected originalIsNumericallyEquivalent ( string $key ) : boolean
$key string
리턴 boolean

performDeleteOnModel() 보호된 메소드

Perform the actual delete query on this model instance.
protected performDeleteOnModel ( ) : void
리턴 void

performInsert() 보호된 메소드

Perform a model insert operation.
protected performInsert ( Builder $query ) : boolean
$query Builder
리턴 boolean

performUpdate() 보호된 메소드

Perform a model update operation.
protected performUpdate ( Builder $query, array $options = [] ) : boolean
$query Builder
$options array
리턴 boolean

push() 공개 메소드

Save the model and all of its relationships.
public push ( ) : boolean
리턴 boolean

query() 공개 정적인 메소드

Begin querying the model.
public static query ( ) : Builder
리턴 Builder

registerModelEvent() 보호된 정적인 메소드

Register a model event with the dispatcher.
protected static registerModelEvent ( string $event, Closure | string $callback, integer $priority ) : void
$event string
$callback Closure | string
$priority integer
리턴 void

reguard() 공개 정적인 메소드

Enable the mass assignment restrictions.
public static reguard ( ) : void
리턴 void

relationLoaded() 공개 메소드

Determine if the given relation is loaded.
public relationLoaded ( string $key ) : boolean
$key string
리턴 boolean

relationsToArray() 공개 메소드

Get the model's relationships in array form.
public relationsToArray ( ) : array
리턴 array

removeObservableEvents() 공개 메소드

Remove an observable event name.
public removeObservableEvents ( array | mixed $observables ) : void
$observables array | mixed
리턴 void

removeTableFromKey() 보호된 메소드

Remove the table name from a given key.
protected removeTableFromKey ( string $key ) : string
$key string
리턴 string

replicate() 공개 메소드

Clone the model into a new, non-existing instance.
public replicate ( array $except = null ) : Model
$except array
리턴 Model

resolveConnection() 공개 정적인 메소드

Resolve a connection instance.
public static resolveConnection ( string | null $connection = null ) : Connection
$connection string | null
리턴 Illuminate\Database\Connection

save() 공개 메소드

Save the model to the database.
public save ( array $options = [] ) : boolean
$options array
리턴 boolean

saveOrFail() 공개 메소드

Save the model to the database using transaction.
public saveOrFail ( array $options = [] ) : boolean
$options array
리턴 boolean

saved() 공개 정적인 메소드

Register a saved model event with the dispatcher.
public static saved ( Closure | string $callback, integer $priority ) : void
$callback Closure | string
$priority integer
리턴 void

saving() 공개 정적인 메소드

Register a saving model event with the dispatcher.
public static saving ( Closure | string $callback, integer $priority ) : void
$callback Closure | string
$priority integer
리턴 void

serializeDate() 보호된 메소드

Prepare a date for array / JSON serialization.
protected serializeDate ( DateTimeInterfac\DateTimeInterface $date ) : string
$date DateTimeInterfac\DateTimeInterface
리턴 string

setAppends() 공개 메소드

Set the accessors to append to model arrays.
public setAppends ( array $appends )
$appends array

setAttribute() 공개 메소드

Set a given attribute on the model.
public setAttribute ( string $key, mixed $value )
$key string
$value mixed

setConnection() 공개 메소드

Set the connection associated with the model.
public setConnection ( string $name )
$name string

setConnectionResolver() 공개 정적인 메소드

Set the connection resolver instance.
public static setConnectionResolver ( Illuminate\Database\ConnectionResolverInterface $resolver ) : void
$resolver Illuminate\Database\ConnectionResolverInterface
리턴 void

setCreatedAt() 공개 메소드

Set the value of the "created at" attribute.
public setCreatedAt ( mixed $value )
$value mixed

setDateFormat() 공개 메소드

Set the date format used by the model.
public setDateFormat ( string $format )
$format string

setEventDispatcher() 공개 정적인 메소드

Set the event dispatcher instance.
public static setEventDispatcher ( Illuminate\Contracts\Events\Dispatcher $dispatcher ) : void
$dispatcher Illuminate\Contracts\Events\Dispatcher
리턴 void

setHidden() 공개 메소드

Set the hidden attributes for the model.
public setHidden ( array $hidden )
$hidden array

setIncrementing() 공개 메소드

Set whether IDs are incrementing.
public setIncrementing ( boolean $value )
$value boolean

setKeyName() 공개 메소드

Set the primary key for the model.
public setKeyName ( string $key )
$key string

setKeysForSaveQuery() 보호된 메소드

Set the keys for a save update query.
protected setKeysForSaveQuery ( Builder $query ) : Builder
$query Builder
리턴 Builder

setObservableEvents() 공개 메소드

Set the observable event names.
public setObservableEvents ( array $observables )
$observables array

setPerPage() 공개 메소드

Set the number of models to return per page.
public setPerPage ( integer $perPage )
$perPage integer

setRawAttributes() 공개 메소드

Set the array of model attributes. No checking is done.
public setRawAttributes ( array $attributes, boolean $sync = false )
$attributes array
$sync boolean

setRelation() 공개 메소드

Set the specific relationship in the model.
public setRelation ( string $relation, mixed $value )
$relation string
$value mixed

setRelations() 공개 메소드

Set the entire relations array on the model.
public setRelations ( array $relations )
$relations array

setTable() 공개 메소드

Set the table associated with the model.
public setTable ( string $table )
$table string

setTouchedRelations() 공개 메소드

Set the relationships that are touched on save.
public setTouchedRelations ( array $touches )
$touches array

setUpdatedAt() 공개 메소드

Set the value of the "updated at" attribute.
public setUpdatedAt ( mixed $value )
$value mixed

setVisible() 공개 메소드

Set the visible attributes for the model.
public setVisible ( array $visible )
$visible array

syncOriginal() 공개 메소드

Sync the original attributes with the current.
public syncOriginal ( )

syncOriginalAttribute() 공개 메소드

Sync a single original attribute with its current value.
public syncOriginalAttribute ( string $attribute )
$attribute string

toArray() 공개 메소드

Convert the model instance to an array.
public toArray ( ) : array
리턴 array

toJson() 공개 메소드

Convert the model instance to JSON.
public toJson ( integer $options ) : string
$options integer
리턴 string

totallyGuarded() 공개 메소드

Determine if the model is totally guarded.
public totallyGuarded ( ) : boolean
리턴 boolean

touch() 공개 메소드

Update the model's update timestamp.
public touch ( ) : boolean
리턴 boolean

touchOwners() 공개 메소드

Touch the owning relations of the model.
public touchOwners ( ) : void
리턴 void

touches() 공개 메소드

Determine if the model touches a given relation.
public touches ( string $relation ) : boolean
$relation string
리턴 boolean

unguard() 공개 정적인 메소드

Disable all mass assignable restrictions.
public static unguard ( boolean $state = true ) : void
$state boolean
리턴 void

unguarded() 공개 정적인 메소드

Run the given callable while being unguarded.
public static unguarded ( callable $callback ) : mixed
$callback callable
리턴 mixed

unsetConnectionResolver() 공개 정적인 메소드

Unset the connection resolver for models.
public static unsetConnectionResolver ( ) : void
리턴 void

unsetEventDispatcher() 공개 정적인 메소드

Unset the event dispatcher for models.
public static unsetEventDispatcher ( ) : void
리턴 void

update() 공개 메소드

Update the model in the database.
public update ( array $attributes = [], array $options = [] ) : boolean
$attributes array
$options array
리턴 boolean

updateTimestamps() 보호된 메소드

Update the creation and update timestamps.
protected updateTimestamps ( ) : void
리턴 void

updated() 공개 정적인 메소드

Register an updated model event with the dispatcher.
public static updated ( Closure | string $callback, integer $priority ) : void
$callback Closure | string
$priority integer
리턴 void

updating() 공개 정적인 메소드

Register an updating model event with the dispatcher.
public static updating ( Closure | string $callback, integer $priority ) : void
$callback Closure | string
$priority integer
리턴 void

usesTimestamps() 공개 메소드

Determine if the model uses timestamps.
public usesTimestamps ( ) : boolean
리턴 boolean

with() 공개 정적인 메소드

Begin querying a model with eager loading.
public static with ( array | string $relations ) : Builder | static
$relations array | string
리턴 Builder | static

프로퍼티 상세

$appends 보호되어 있는 프로퍼티

The accessors to append to the model's array form.
protected array $appends
리턴 array

$attributes 보호되어 있는 프로퍼티

The model's attributes.
protected array $attributes
리턴 array

$booted 보호되어 있는 정적으로 프로퍼티

The array of booted models.
protected static array $booted
리턴 array

$casts 보호되어 있는 프로퍼티

The attributes that should be cast to native types.
protected array $casts
리턴 array

$connection 보호되어 있는 프로퍼티

The connection name for the model.
protected string $connection
리턴 string

$dateFormat 보호되어 있는 프로퍼티

The storage format of the model's date columns.
protected string $dateFormat
리턴 string

$dates 보호되어 있는 프로퍼티

The attributes that should be mutated to dates.
protected array $dates
리턴 array

$dispatcher 보호되어 있는 정적으로 프로퍼티

The event dispatcher instance.
protected static Dispatcher,Illuminate\Contracts\Events $dispatcher
리턴 Illuminate\Contracts\Events\Dispatcher

$events 보호되어 있는 프로퍼티

Allows for object-based events for native Eloquent events.
protected array $events
리턴 array

$exists 공개적으로 프로퍼티

Indicates if the model exists.
public bool $exists
리턴 boolean

$fillable 보호되어 있는 프로퍼티

The attributes that are mass assignable.
protected array $fillable
리턴 array

$globalScopes 보호되어 있는 정적으로 프로퍼티

The array of global scopes on the model.
protected static array $globalScopes
리턴 array

$guarded 보호되어 있는 프로퍼티

The attributes that aren't mass assignable.
protected array $guarded
리턴 array

$hidden 보호되어 있는 프로퍼티

The attributes that should be hidden for arrays.
protected array $hidden
리턴 array

$incrementing 공개적으로 프로퍼티

Indicates if the IDs are auto-incrementing.
public bool $incrementing
리턴 boolean

$keyType 보호되어 있는 프로퍼티

The "type" of the auto-incrementing ID.
protected string $keyType
리턴 string

$manyMethods 공개적으로 정적으로 프로퍼티

The many to many relationship methods.
public static array $manyMethods
리턴 array

$mutatorCache 보호되어 있는 정적으로 프로퍼티

The cache of the mutated attributes for each class.
protected static array $mutatorCache
리턴 array

$observables 보호되어 있는 프로퍼티

User exposed observable events.
protected array $observables
리턴 array

$original 보호되어 있는 프로퍼티

The model attribute's original state.
protected array $original
리턴 array

$perPage 보호되어 있는 프로퍼티

The number of models to return for pagination.
protected int $perPage
리턴 integer

$primaryKey 보호되어 있는 프로퍼티

The primary key for the model.
protected string $primaryKey
리턴 string

$relations 보호되어 있는 프로퍼티

The loaded relationships for the model.
protected array $relations
리턴 array

$resolver 보호되어 있는 정적으로 프로퍼티

The connection resolver instance.
protected static ConnectionResolverInterface,Illuminate\Database $resolver
리턴 Illuminate\Database\ConnectionResolverInterface

$snakeAttributes 공개적으로 정적으로 프로퍼티

Indicates whether attributes are snake cased on arrays.
public static bool $snakeAttributes
리턴 boolean

$table 보호되어 있는 프로퍼티

The table associated with the model.
protected string $table
리턴 string

$timestamps 공개적으로 프로퍼티

Indicates if the model should be timestamped.
public bool $timestamps
리턴 boolean

$touches 보호되어 있는 프로퍼티

The relationships that should be touched on save.
protected array $touches
리턴 array

$unguarded 보호되어 있는 정적으로 프로퍼티

Indicates if all mass assignment is enabled.
protected static bool $unguarded
리턴 boolean

$visible 보호되어 있는 프로퍼티

The attributes that should be visible in arrays.
protected array $visible
리턴 array

$wasRecentlyCreated 공개적으로 프로퍼티

Indicates if the model was inserted during the current request lifecycle.
public bool $wasRecentlyCreated
리턴 boolean

$with 보호되어 있는 프로퍼티

The relations to eager load on every query.
protected array $with
리턴 array