How would i loop through this collection ? Please help.
Illuminate\Database\Eloquent\Collection Object
(
[items:protected] => Array
(
[0] => App\Order Object
(
[fillable:protected] => Array
(
[0] => store_id
[1] => address_id
[2] => customer_id
[3] => token
[4] => order_total
[5] => payment_type_id
[6] => shipping_address
[7] => billing_address
[8] => order_status
)
[connection:protected] =>
[table:protected] =>
[primaryKey:protected] => id
[perPage:protected] => 15
[incrementing] => 1
[timestamps] => 1
[attributes:protected] => Array
(
[id] => 27
[customer_id] => 8
[store_id] => 1
[address_id] => 0
[token] => OT5SdfJFWA
[order_total] => 0.00
[payment_type_id] => 0
[shipping_address] => {"id":"8","customer_id":"8","name":"Aditya Banerjee","pincode":"110018","address":"H-5c Gulmohar Apartments Vikas Puri \r\n ","landmark":"New Delhi","city":"New delhi ","area":"New Delhi","state":null,"phone":"9958537480","created_at":"2016-01-04 10:55:01","updated_at":"2016-01-04 10:55:01"}
[billing_address] => {"id":"8","customer_id":"8","name":"Aditya Banerjee","pincode":"110018","address":"H-5c Gulmohar Apartments Vikas Puri \r\n ","landmark":"New Delhi","city":"New delhi ","area":"New Delhi","state":null,"phone":"9958537480","created_at":"2016-01-04 10:55:01","updated_at":"2016-01-04 10:55:01"}
[order_status] => 1
[created_at] => 2016-01-04 11:48:49
[updated_at] => 2016-01-04 11:48:56
)
[original:protected] => Array
(
[id] => 27
[customer_id] => 8
[store_id] => 1
[address_id] => 0
[token] => OT5SdfJFWA
[order_total] => 0.00
[payment_type_id] => 0
[shipping_address] => {"id":"8","customer_id":"8","name":"Aditya Banerjee","pincode":"110018","address":"H-5c Gulmohar Apartments Vikas Puri \r\n ","landmark":"New Delhi","city":"New delhi ","area":"New Delhi","state":null,"phone":"9958537480","created_at":"2016-01-04 10:55:01","updated_at":"2016-01-04 10:55:01"}
[billing_address] => {"id":"8","customer_id":"8","name":"Aditya Banerjee","pincode":"110018","address":"H-5c Gulmohar Apartments Vikas Puri \r\n ","landmark":"New Delhi","city":"New delhi ","area":"New Delhi","state":null,"phone":"9958537480","created_at":"2016-01-04 10:55:01","updated_at":"2016-01-04 10:55:01"}
[order_status] => 1
[created_at] => 2016-01-04 11:48:49
[updated_at] => 2016-01-04 11:48:56
)
[relations:protected] => Array
(
[orderDetails] => Illuminate\Database\Eloquent\Collection Object
(
[items:protected] => Array
(
[0] => App\OrderDetail Object
(
[fillable:protected] => Array
(
[0] => order_id
[1] => product_id
[2] => product_code
[3] => product_name
[4] => quantity
[5] => price
)
[connection:protected] =>
[table:protected] =>
[primaryKey:protected] => id
[perPage:protected] => 15
[incrementing] => 1
[timestamps] => 1
[attributes:protected] => Array
(
[id] => 54
[order_id] => 27
[product_id] => 9
[product_code] => 61
[product_name] => Gouda Cheese-200 gms
[quantity] => 1
[price] => 298
[created_at] => 2016-01-04 11:48:49
[updated_at] => 2016-01-04 11:48:49
)
[original:protected] => Array
(
[id] => 54
[order_id] => 27
[product_id] => 9
[product_code] => 61
[product_name] => Gouda Cheese-200 gms
[quantity] => 1
[price] => 298
[created_at] => 2016-01-04 11:48:49
[updated_at] => 2016-01-04 11:48:49
)
[relations:protected] => Array
(
)
[hidden:protected] => Array
(
)
[visible:protected] => Array
(
)
[appends:protected] => Array
(
)
[guarded:protected] => Array
(
[0] => *
)
[dates:protected] => Array
(
)
[dateFormat:protected] =>
[casts:protected] => Array
(
)
[touches:protected] => Array
(
)
[observables:protected] => Array
(
)
[with:protected] => Array
(
)
[morphClass:protected] =>
[exists] => 1
[wasRecentlyCreated] =>
)
[1] => App\OrderDetail Object
(
[fillable:protected] => Array
(
[0] => order_id
[1] => product_id
[2] => product_code
[3] => product_name
[4] => quantity
[5] => price
)
[connection:protected] =>
[table:protected] =>
[primaryKey:protected] => id
[perPage:protected] => 15
[incrementing] => 1
[timestamps] => 1
[attributes:protected] => Array
(
[id] => 55
[order_id] => 27
[product_id] => 6
[product_code] => 61
[product_name] => Cheddar Cheese-200
[quantity] => 1
[price] => 400
[created_at] => 2016-01-04 11:48:49
[updated_at] => 2016-01-04 11:48:49
)
[original:protected] => Array
(
[id] => 55
[order_id] => 27
[product_id] => 6
[product_code] => 61
[product_name] => Cheddar Cheese-200
[quantity] => 1
[price] => 400
[created_at] => 2016-01-04 11:48:49
[updated_at] => 2016-01-04 11:48:49
)
[relations:protected] => Array
(
)
[hidden:protected] => Array
(
)
[visible:protected] => Array
(
)
[appends:protected] => Array
(
)
[guarded:protected] => Array
(
[0] => *
)
[dates:protected] => Array
(
)
[dateFormat:protected] =>
[casts:protected] => Array
(
)
[touches:protected] => Array
(
)
[observables:protected] => Array
(
)
[with:protected] => Array
(
)
[morphClass:protected] =>
[exists] => 1
[wasRecentlyCreated] =>
)
[2] => App\OrderDetail Object
(
[fillable:protected] => Array
(
[0] => order_id
[1] => product_id
[2] => product_code
[3] => product_name
[4] => quantity
[5] => price
)
[connection:protected] =>
[table:protected] =>
[primaryKey:protected] => id
[perPage:protected] => 15
[incrementing] => 1
[timestamps] => 1
[attributes:protected] => Array
(
[id] => 56
[order_id] => 27
[product_id] => 1
[product_code] => 1
[product_name] => Mango
[quantity] => 1
[price] => 90
[created_at] => 2016-01-04 11:48:49
[updated_at] => 2016-01-04 11:48:49
)
[original:protected] => Array
(
[id] => 56
[order_id] => 27
[product_id] => 1
[product_code] => 1
[product_name] => Mango
[quantity] => 1
[price] => 90
[created_at] => 2016-01-04 11:48:49
[updated_at] => 2016-01-04 11:48:49
)
[relations:protected] => Array
(
)
[hidden:protected] => Array
(
)
[visible:protected] => Array
(
)
[appends:protected] => Array
(
)
[guarded:protected] => Array
(
[0] => *
)
[dates:protected] => Array
(
)
[dateFormat:protected] =>
[casts:protected] => Array
(
)
[touches:protected] => Array
(
)
[observables:protected] => Array
(
)
[with:protected] => Array
(
)
[morphClass:protected] =>
[exists] => 1
[wasRecentlyCreated] =>
)
)
)
)
[hidden:protected] => Array
(
)
[visible:protected] => Array
(
)
[appends:protected] => Array
(
)
[guarded:protected] => Array
(
[0] => *
)
[dates:protected] => Array
(
)
[dateFormat:protected] =>
[casts:protected] => Array
(
)
[touches:protected] => Array
(
)
[observables:protected] => Array
(
)
[with:protected] => Array
(
)
[morphClass:protected] =>
[exists] => 1
[wasRecentlyCreated] =>
)
)
)