class CachedModel extends BaseModel

A database object with the ability to be cached in the memory

Methods

static BaseModel
get(int|BaseModel $id)

Get a Model based on its ID

refresh()

Fetch a model's data from the database again

Details

at line line 20
static BaseModel get(int|BaseModel $id)

Get a Model based on its ID

Parameters

int|BaseModel $id The ID of the object to look for, or the object itself

Return Value

BaseModel

Exceptions

InvalidArgumentException If $id is an object of an incorrect type

at line line 94
BaseModel refresh()

Fetch a model's data from the database again

Return Value

BaseModel The new model