HasJsonable concern for a model

Protected Properties

protected array $jsonable

jsonable attribute names that are json encoded and decoded from the database

Public Methods

public addJsonable()

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

addJsonable attributes for the model.

public getJsonable()

public getJsonable(): array 

getJsonable attributes name

public isJsonable()

public isJsonable($key): array 

isJsonable checks if an attribute is jsonable or not.

public jsonable()

public jsonable(array $jsonable): $this 

jsonable attributes set for the model.

Protected Methods

protected addJsonableAttributesToArray()

protected addJsonableAttributesToArray($attributes, $mutatedAttributes): array