HasTimestamps
Properties
$timestamps bool
Indicates if the model should be timestamped.
$ignoreTimestampsOn array
The list of models classes that have timestamps temporarily disabled.
Methods
touch ( $attribute ) : bool
Update the model's update timestamp.
Parameters
- $attribute string|null
touchQuietly ( $attribute ) : bool
Update the model's update timestamp without raising any events.
Parameters
- $attribute string|null
updateTimestamps ( ) : $this
Update the creation and update timestamps.
setCreatedAt ( $value ) : $this
Set the value of the "created at" attribute.
Parameters
- $value mixed
setUpdatedAt ( $value ) : $this
Set the value of the "updated at" attribute.
Parameters
- $value mixed
freshTimestampString ( ) : string
Get a fresh timestamp for the model.
usesTimestamps ( ) : bool
Determine if the model uses timestamps.
getCreatedAtColumn ( ) : string|null
Get the name of the "created at" column.
getUpdatedAtColumn ( ) : string|null
Get the name of the "updated at" column.
getQualifiedCreatedAtColumn ( ) : string|null
Get the fully qualified "created at" column.
getQualifiedUpdatedAtColumn ( ) : string|null
Get the fully qualified "updated at" column.
withoutTimestamps ( callable $callback ) : mixed
Disable timestamps for the current class during the given callback scope.
Parameters
- $callback callable
withoutTimestampsOn ( $models , $callback ) : mixed
Disable timestamps for the given model classes during the given callback scope.
Parameters
- $models array
- $callback callable
isIgnoringTimestamps ( $class ) : bool
Determine if the given model is ignoring timestamps / touches.
Parameters
- $class string|null