HasTimestamps
trait HasTimestamps
Properties
bool | $timestamps | Indicates if the model should be timestamped. |
Methods
Update the model's update timestamp.
Update the creation and update timestamps.
Set the value of the "created at" attribute.
Set the value of the "updated at" attribute.
Get a fresh timestamp for the model.
Get a fresh timestamp for the model.
Determine if the model uses timestamps.
Get the name of the "created at" column.
Get the name of the "updated at" column.
Details
at line 21
bool
touch()
Update the model's update timestamp.
at line 37
protected void
updateTimestamps()
Update the creation and update timestamps.
at line 56
$this
setCreatedAt(mixed $value)
Set the value of the "created at" attribute.
at line 69
$this
setUpdatedAt(mixed $value)
Set the value of the "updated at" attribute.
at line 81
Carbon
freshTimestamp()
Get a fresh timestamp for the model.
at line 91
string
freshTimestampString()
Get a fresh timestamp for the model.
at line 101
bool
usesTimestamps()
Determine if the model uses timestamps.
at line 111
string
getCreatedAtColumn()
Get the name of the "created at" column.
at line 121
string
getUpdatedAtColumn()
Get the name of the "updated at" column.