HasTimestamps
trait HasTimestamps (View source)
Properties
bool | $timestamps | Indicates if the model should be timestamped. |
|
static protected array | $ignoreTimestampsOn | The list of models classes that have timestamps temporarily disabled. |
Methods
Update the model's update timestamp.
Update the model's update timestamp without raising any events.
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.
Get the fully qualified "created at" column.
Get the fully qualified "updated at" column.
Disable timestamps for the current class during the given callback scope.
Disable timestamps for the given model classes during the given callback scope.
Determine if the given model is ignoring timestamps / touches.
Details
bool
touchQuietly(string|null $attribute = null)
Update the model's update timestamp without raising any events.
static mixed
withoutTimestamps(callable $callback)
Disable timestamps for the current class during the given callback scope.
static mixed
withoutTimestampsOn(array $models, callable $callback)
Disable timestamps for the given model classes during the given callback scope.