I have problem to get value of protected array in my laravel project and want to save my data into database using foreach. I used to print_r my data
print_r($request->data);
Here is my array data:
Illuminate\Support\Collection Object
(
[items:protected] => Array
(
[0] => stdClass Object
(
[id] => 900
[zone_id] => 1
[account_id] => 2
[size] => 23474836488
)
[1] => stdClass Object
(
[id] => 9001
[zone_id] => 2
[account_id] => 2
[size] => 23474836488
)
)
)
Is there any solution of my problem?
print_r($request->data->toArray()).