sercanvirlan
sercanvirlan

I am trying to show a related column but somethings wrong.

What i am missing ?

campaign/columns.yaml


columns:
    agencyId:
        label: Agency
        relation: Agency
        select: @title

The error is :

Model '***\Models\Campaign' does not contain a definition for 'Agency'.

Last updated

alxy
alxy

Post your Campaign model as well. Basically, it seems that you forgot to add the relation (probably belongsTo Agency) to your model: http://octobercms.com/docs/database/model#relationships

1-2 of 2