This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

walter.steenvoorden27194
walter.steenvoorden27194

I'm building an application which selects groups based on the id of a school.

Yaml: sid: label: School (Webshop) type: dropdown

teacher_webshops:
    label: webshops
    type: relation
    select: shopname
    dependsOn: sid  

The user has a hastomany relation defined as

    'student_webshops' => [
        'Wsn\Shopmanagement\Models\ShopUser',
        'table' => 'wsn_shopmanagement_user_shop_rel',
        'key' => 'user_id',
        'otherKey' => 'shop_id'
    ],

The Sid is short for school id, school id's are stored in a table containing shopname and id.

The thing i would like to do is to use the sid to scope the results in student_webshops and only return the webshops associated with the school id

maycon.ghizzi34750
maycon.ghizzi34750

I have same problem.

Have any solutions ?

emanoelevaristo

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.