Base model.
Constructor.
| Type | Description |
|---|---|
| string | (optional) Name of the database connection to use (as defined in the config) |
NULL
public function __construct($connection = null)
{
$this->connection = Database::connection($connection);
}
Factory method making method chaining possible right off the bat.
| Type | Description |
|---|---|
| string | (optional) Name of the database connection to use (as defined in the config) |
mako\Model
public static function factory($connection = null)
{
return new static($connection);
}