This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
I wanted to extend list filter in the fashion that options of one filter depends on selected values in other filter. On the paper, it is easy. Info about particular filter is stored in Session[
public function listFilterExtendQuery($query,$definition = null,$widget)
{
if($definition->scopeName === 'filter2')
{
$filter1 = $widget->getScopes()['filter1']->value;
if(!is_array($filter1)) $filter1= [];
foreach($filter1 as $key => $filter)
{
$filters[] = $key;
}
$query->whereIn('filter_1',$filters);
}
elseif($definition->scopeName === 'filter1')
{
$query->select('status')->distinct()->where('owner_id', '=', $user->id);
}
}
Last updated
hi, One year later, i guess it's related to this : https://github.com/octobercms/october/issues/1918 I still have the same issue on a fresh install now. Is this issue supposed to be fixed ?
1-2 of 2