public function __construct(Connection $connection = null, $model = '')
{
$this->connection = $connection ?: Db::connect([], true);
$this->builder = $this->connection->getConfig('builder') ?: $this->connection->getConfig('type');
$this->prefix = $this->connection->getConfig('prefix');
$this->model = $model;
}