首页 > 解决方案 > 如何访问树枝中另一个实体内部的实体?

问题描述

我有两张桌子:

钥匙

历史

如何访问Twigkey中的实体内部?history

{{ history.key.hook }}似乎不起作用?

{{ dump(history) }}提供这个:

object(RedBeanPHP\OODBBean)#120 (10) { ["properties":protected]=> array(5) { ["id"]=> string(1) "1" ["date"]=> string(19) "2018-12-06 16:06:21" ["action"]=> string(6) "Issued" ["user_id"]=> string(1) "1" ["key_id"]=> string(2) "17" } ["__info":protected]=> array(7) { ["type"]=> string(7) "history" ["sys.id"]=> string(2) "id" ["sys.orig"]=> array(5) { ["id"]=> string(1) "1" ["date"]=> string(19) "2018-12-06 16:06:21" ["action"]=> string(6) "Issued" ["user_id"]=> string(1) "1" ["key_id"]=> string(2) "17" } ["tainted"]=> bool(false) ["changed"]=> bool(false) ["changelist"]=> array(0) { } ["model"]=> NULL } ["beanHelper":protected]=> object(RedBeanPHP\BeanHelper\SimpleFacadeBeanHelper)#28 (0) { } ["fetchType":protected]=> NULL ["withSql":protected]=> string(0) "" ["withParams":protected]=> array(0) { } ["aliasName":protected]=> NULL ["via":protected]=> NULL ["noLoad":protected]=> bool(false) ["all":protected]=> bool(false) }

标签: phptwigredbean

解决方案


推荐阅读