trait TimestampedTrait

Timestamped trait.

Methods

array
getTimestampedTraitHooks()

Returns trait hooks.

array
getTimestampedTraitCasts()

Returns trait casts.

bool
shouldTouchOnInsert()

Should we touch relations on insert?

bool
shouldTouchOnUpdate()

Should we touch relations on update?

bool
shouldTouchOnDelete()

Should we touch relations on delete?

string
getCreatedAtColumn()

Returns the column that holds the "created at" timestamp.

string
getUpdatedAtColumn()

Returns the column that holds the "updated at" timestamp.

array
getRelationsToTouch()

Returns the relations that we should touch.

bool
touch()

Allows you to update the "updated at" timestamp without modifying any data.

touchRelated()

Touches related records.

Details

at line 26
protected array getTimestampedTraitHooks()

Returns trait hooks.

Return Value

array

at line 98
protected array getTimestampedTraitCasts()

Returns trait casts.

Return Value

array

at line 108
protected bool shouldTouchOnInsert()

Should we touch relations on insert?

Return Value

bool

at line 118
protected bool shouldTouchOnUpdate()

Should we touch relations on update?

Return Value

bool

at line 128
protected bool shouldTouchOnDelete()

Should we touch relations on delete?

Return Value

bool

at line 138
string getCreatedAtColumn()

Returns the column that holds the "created at" timestamp.

Return Value

string

at line 148
string getUpdatedAtColumn()

Returns the column that holds the "updated at" timestamp.

Return Value

string

at line 158
protected array getRelationsToTouch()

Returns the relations that we should touch.

Return Value

array

at line 168
bool touch()

Allows you to update the "updated at" timestamp without modifying any data.

Return Value

bool

at line 183
protected touchRelated()

Touches related records.