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 28
protected array getTimestampedTraitHooks()

Returns trait hooks.

Return Value

array

at line 100
protected array getTimestampedTraitCasts()

Returns trait casts.

Return Value

array

at line 110
protected bool shouldTouchOnInsert()

Should we touch relations on insert?

Return Value

bool

at line 120
protected bool shouldTouchOnUpdate()

Should we touch relations on update?

Return Value

bool

at line 130
protected bool shouldTouchOnDelete()

Should we touch relations on delete?

Return Value

bool

at line 140
string getCreatedAtColumn()

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

Return Value

string

at line 150
string getUpdatedAtColumn()

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

Return Value

string

at line 160
protected array getRelationsToTouch()

Returns the relations that we should touch.

Return Value

array

at line 170
bool touch()

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

Return Value

bool

at line 185
protected touchRelated()

Touches related records.