trait HasAttributes

Methods

void
addCasts(array $attributes)

Add attribute casts for the model.

getAttribute($key)

No description

getAttributeValue($key)

No description

attributesToArray()

No description

setAttribute(string $key, mixed $value)

Set a given attribute on the model.

asSerialized($value)

No description

fromSerialized($value)

No description

isSerializedCastable($key)

No description

asDateTime($value)

No description

asTime($value)

No description

string
fromTime(Carbon|int $value)

Convert a Carbon Time to a storable string.

bool
isTimeCastable(string $key)

Determine whether a value is Time castable for inbound manipulation.

string
getTimeFormat()

Get the format for database stored times.

setTimeFormat(string $format)

Set the time format used by the model.

Details

at line 19
void addCasts(array $attributes)

Add attribute casts for the model.

Parameters

array $attributes

Return Value

void

at line 24
getAttribute($key)

No description

Parameters

$key

at line 46
getAttributeValue($key)

No description

Parameters

$key

at line 65
attributesToArray()

No description

at line 111
HasAttributes setAttribute(string $key, mixed $value)

Set a given attribute on the model.

Parameters

string $key
mixed $value

Return Value

HasAttributes

at line 170
protected asSerialized($value)

No description

Parameters

$value

at line 175
fromSerialized($value)

No description

Parameters

$value

at line 180
protected isSerializedCastable($key)

No description

Parameters

$key

at line 185
protected asDateTime($value)

No description

Parameters

$value

at line 197
protected asTime($value)

No description

Parameters

$value

at line 242
string fromTime(Carbon|int $value)

Convert a Carbon Time to a storable string.

Parameters

Carbon|int $value

Return Value

string

at line 259
protected bool isTimeCastable(string $key)

Determine whether a value is Time castable for inbound manipulation.

Parameters

string $key

Return Value

bool

at line 268
protected string getTimeFormat()

Get the format for database stored times.

Return Value

string

at line 280
HasAttributes setTimeFormat(string $format)

Set the time format used by the model.

Parameters

string $format

Return Value

HasAttributes