@foreach($brands as $key => $row)
    <div class="form-check">
        <input class="form-check-input" type="checkbox" {{in_array($key,($request->brand_id ?? [])) ? 'checked' : ''}} onclick="filter()" name="brand_id[]" value="{{$key}}" id="brand{{$key}}">
        <label class="form-check-label" for="brand{{$key}}"> {{$row['title']}} <span class="num"> ({{$row['count']}}) </span> </label>
    </div>
@endforeach
