我有一个专栏 placementitems ,每次用户下订单时都会存储json对象。所以,我能够成功显示第一个json对象(第一个订单)。它会抛出a as 为第二个和第四个对象提供foreach()的无效参数。
java.sql.Date
` 在laravel视图刀片
Collection {#207 ▼
#items: array:1 [▼
0 => Order {#211 ▼
#casts: array:1 [▶]
#fillable: array:8 [▶]
#connection: null
#table: null
#primaryKey: "id"
#keyType: "int"
#perPage: 15
+incrementing: true
+timestamps: true
#attributes: array:10 [▶]
#original: array:10 [▼
"id" => 1
"tableno" => "9"
"noofitems" => 2
"placeditems" => ""[{\"item\":\" Cafe Latte\",\"qty\":\"2\"}][{\"item\":\" Egg Sandwich\",\"qty\":\"3\"}]""
"total" => 106
"paidstatus" => 0
"deliveredstatus" => 0
"created_at" => "2017-07-14 11:32:29"
"updated_at" => "2017-07-14 11:36:37"
"username" => "harish"
]
#relations: []
#hidden: []
#visible: []
#appends: []
#guarded: array:1 [▶]
#dates: []
#dateFormat: null
#touches: []
#observables: []
#with: []
#morphClass: null
+exists: true
+wasRecentlyCreated: false
}
]
}