TimestampedTrait
trait TimestampedTrait
Timestamped trait.
Methods
Returns trait hooks.
Returns trait casts.
Should we touch relations on insert?
Should we touch relations on update?
Should we touch relations on delete?
Returns the column that holds the "created at" timestamp.
Returns the column that holds the "updated at" timestamp.
Returns the relations that we should touch.
Allows you to update the "updated at" timestamp without modifying any data.
Touches related records.
Details
at line 26
protected array
getTimestampedTraitHooks()
Returns trait hooks.
at line 98
protected array
getTimestampedTraitCasts()
Returns trait casts.
at line 108
protected bool
shouldTouchOnInsert()
Should we touch relations on insert?
at line 118
protected bool
shouldTouchOnUpdate()
Should we touch relations on update?
at line 128
protected bool
shouldTouchOnDelete()
Should we touch relations on delete?
at line 138
string
getCreatedAtColumn()
Returns the column that holds the "created at" timestamp.
at line 148
string
getUpdatedAtColumn()
Returns the column that holds the "updated at" timestamp.
at line 158
protected array
getRelationsToTouch()
Returns the relations that we should touch.
at line 168
bool
touch()
Allows you to update the "updated at" timestamp without modifying any data.
at line 183
protected
touchRelated()
Touches related records.