Definition

Filter::field('price', [FilterType::BETWEEN_COLUMNS]);

Array/Object Structure

target
string
required
value
array,size:2
required
value.*
string
required

Example

$filter = [
    'type'   => '$betweenColumns',
    'target' => 'price',
    'value'  => [
        'min_allowed_price',
        'max_allowed_price',
    ],
];
$sql = Product::filter([$filter])->toRawSql();

SQL

select
  *
from
  "products"
where
  "products"."price" between "products"."min_allowed_price"
  and "products"."max_allowed_price"

Modifiers

None available.