$query = Model::where('foo', '=', 'bar');$sql = str_replace("?", "'%s'", $query->toSql())vsprintf($sql, $query->getBindings())