Model
class Model extends DB
The Database Model provides a base class for all database models.
Properties
protected QueryBuilder | $queryBuilder | The query builder instance. | from DB |
protected string | $table | The table associated with the model. | |
protected string | $primaryKey | The primary key for the model. |
Methods
__construct()
No description
static DB
table($table, $primaryKey = 'id')
Instantiate a new DB model with the given table name.
from DB
static mixed
__callStatic(string $name, array $arguments)
We will this magic method to handle all statuc/instance methods.
static
all()
No description
Details
at line 33
__construct()
in DB at line 41
static DB
table($table, $primaryKey = 'id')
Instantiate a new DB model with the given table name.
in DB at line 57
setPrimaryKey($primaryKey)
Set the primary key for the model.
in DB at line 76
__call(string $name, array $arguments)
Proxy method for the query builder.
at line 59
static mixed
__callStatic(string $name, array $arguments)
We will this magic method to handle all statuc/instance methods.