trait Illuminate / Database / Eloquent / Concerns / HasTimestamps
You are viewing an older version of the documentation. For the latest, please visit master documentation.

HasTimestamps

Properties

public

$timestamps bool

Indicates if the model should be timestamped.

Default: true

Methods

public

touch ( ) : bool

Update the model's update timestamp.

public

updateTimestamps ( ) : void

Update the creation and update timestamps.

public

setCreatedAt ( $value ) : $this

Set the value of the "created at" attribute.

Parameters

  • $value mixed
public

setUpdatedAt ( $value ) : $this

Set the value of the "updated at" attribute.

Parameters

  • $value mixed
public

freshTimestamp ( ) : Carbon

Get a fresh timestamp for the model.

public

freshTimestampString ( ) : string

Get a fresh timestamp for the model.

public

usesTimestamps ( ) : bool

Determine if the model uses timestamps.

public

getCreatedAtColumn ( ) : string|null

Get the name of the "created at" column.

public

getUpdatedAtColumn ( ) : string|null

Get the name of the "updated at" column.

public

getQualifiedCreatedAtColumn ( ) : string|null

Get the fully qualified "created at" column.

public

getQualifiedUpdatedAtColumn ( ) : string|null

Get the fully qualified "updated at" column.