【发布时间】:2016-05-14 16:36:53
【问题描述】:
我现在如何能够在 Octobercms 的 YAML 配置中选择另一个表,我有这样的:
season:
label: Season
type: relation
select: concat(title, ' - ', ' Season ', number)
选择标题和数字,但我想做的是选择多个表并使用 concat 来选择特定的列。
从下面的答案中,我已经尝试过了,但我不知道从那里去哪里。基本上来自它包含的剧集 feild.yaml:
season:
label: Season
descriptionFrom: description
span: auto
type: partial
path: ~/plugins/test/movie/models/season/_content_column.htm
我希望能够获取该剧集与电影相关的季节。以前的代码是一个关系,显示“所有”季节。我想显示在电影中创建的该电影的特定季节,以显示在该剧集的下拉列表中以供选择。
【问题讨论】:
标签: php mysql laravel yaml octobercms