雄辩的奥姆秀? 而是在where子句中的值

i have this function:

public function obtenerListaRegistros($where = NULL) {
    $bdObjeto = static::query();
    if ($where != NULL) {
        foreach ($where AS $w) {
            $bdObjeto->where($w['columna'], $w['condicional'], $w['valor']);
        }
    }

    return $bdObjeto->toSql();
}

the array $where is similar to:

array(
    0 => array(
       'columna' => 'deleted'
       'condicional' => '=',
       'valor' => 0
    )
);

but it returns select * from usuario where delected = ? instead select * from usuario where deleted = 0 ...

I had tried without the foreach but it still showing the "?" and the ->get() function but this returns all rows...

thanks in advance

That's because Laravel uses bindings to insert values into the query to avoid SQL injection. The ?s will be replaced with the actual values when the query is run.