我试图在使用雄辩的laravel之间删除句子中的引号:
public function scopeGetOptionCommission($query, $params, $range)
{
$query->where('column1', $params->foo);
$query->where('column2', $params->bar);
$query->whereRaw('? BETWEEN rangeA and rangeB', [$range]);
return $query;
}
在SQL中我得到了这个:
select
*
from
`table1`
where
`column1` = 'foo' and
`column2` = 'bar' and
'60' BETWEEN rangoi and rangof
但我希望得到没有引号的范围值