【发布时间】:2019-01-24 20:39:29
【问题描述】:
我在将值传递给 laravel 视图时遇到问题 传递给视图的对象具有值
Collection {#270 ▼
#items: array:2 [▼
0 => {#275 ▼
+"id": 3
+"category_id": 136
+"service_name": "ServiceName"
+"service_description": "fgdgfgfdg"
+"image": null
+"created_at": "2018-08-17 18:09:16"
+"updated_at": "2018-08-17 18:09:16"
+"something": Collection {#101 ▼
#items: array:2 [▼
0 => "ABC"
1 => "DEF"
]
}
}
]
}
而视图中的对象dd是:-
Collection {#270 ▼
#items: array:2 [▼
0 => {#275 ▼
+"id": 3
+"category_id": 136
+"service_name": "ServiceName"
+"service_description": "fgdgfgfdg"
+"image": null
+"created_at": "2018-08-17 18:09:16"
+"updated_at": "2018-08-17 18:09:16"
}
]
}
如何获取所有值(传递对象的某个属性)。
【问题讨论】:
-
看不到代码我们帮不了你
标签: php laravel laravel-5.6 laravel-blade