This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
    noideawhattotypehere
    
            
            
                    
                                            
        
    
        Hi, this is my filter config for Tedomir\Blog\Models\Post
`location:
    label: Location
    modelClass: Tedomir\Blog\Models\Post
    type: group
    nameFrom: location
    conditions: location in (select location from tedomir_blog_posts where id in (:filtered))`
Basically what i want is filtering lists by available locations, but I can't find a solution for my problem - I want to filter out empty values and duplicates, how do i apply a scope for available values in the dropdown?
Last updated
    noideawhattotypehere
    
            
            
                    
                                            
        
    
        Nevermind, answer -> https://octobercms.com/docs/backend/lists#extend-model-query
    planetadeleste
    
            
            
                    
                                            
        
    
        Thanks to your question I found a solution to filter with multiple categories.
// Table planetadeleste_catalog_product_categories
product_id
category_id
categories:
    label: Categories
    modelClass: PlanetaDelEste\Catalog\Models\Category
    nameFrom: name
    conditions: id in (select product_id from planetadeleste_catalog_product_categories where category_id in (:filtered))Thanks
1-3 of 3