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 28
protected array
getTimestampedTraitHooks()
Returns trait hooks.
at line 100
protected array
getTimestampedTraitCasts()
Returns trait casts.
at line 110
protected bool
shouldTouchOnInsert()
Should we touch relations on insert?
at line 120
protected bool
shouldTouchOnUpdate()
Should we touch relations on update?
at line 130
protected bool
shouldTouchOnDelete()
Should we touch relations on delete?
at line 140
string
getCreatedAtColumn()
Returns the column that holds the "created at" timestamp.
at line 150
string
getUpdatedAtColumn()
Returns the column that holds the "updated at" timestamp.
at line 160
protected array
getRelationsToTouch()
Returns the relations that we should touch.
at line 170
bool
touch()
Allows you to update the "updated at" timestamp without modifying any data.
at line 185
protected
touchRelated()
Touches related records.