HasAttributes concern for a model

Public Methods

public addCasts()

public addCasts(array $attributes): void 

addCasts adds attribute casts for the model.

public addDateAttribute()

public addDateAttribute(string $attribute): void 

addDateAttribute adds a datetime attribute to convert to an instance of Carbon/DateTime object.

public addFillable()

public addFillable(array|string|null $attributes = null): void 

addFillable attributes for the model.

public addVisible()

public addVisible(array|string|null $attributes = null): void 

addVisible attributes for the model.

public attributesToArray()

public attributesToArray(): array 

attributesToArray converts the model's attributes to an array.

public getAttribute()

public getAttribute($key): mixed 

getAttribute from the model. Overridden from {@link Eloquent} to implement recognition of the relation.

public getAttributeValue()

public getAttributeValue(string $key): mixed 

getAttributeValue gets a plain attribute (not a relationship).

public getDates()

public getDates(): array 

getDates returns the attributes that should be converted to dates.

public hasGetMutator()

public hasGetMutator(string $key): bool 

hasGetMutator determines if a get mutator exists for an attribute.

public hasSetMutator()

public hasSetMutator(string $key): bool 

hasSetMutator determines if a set mutator exists for an attribute.

public setAttribute()

public setAttribute(string $key, mixed $value): void 

setAttribute sets a given attribute on the model.