Get data value from an sub array using Laravel

Good morning! I have a bug, thanks for your help in advance.

I have array from Vuejs object form and I want to save the value of each specific key. Let's try to loop the object then pass the key, I have error

"Trying to get property 'user_name' of non-object", exception: "ErrorException",…}

enter image description here

    $team = $request->team;
foreach ($team as $data) {
return response($key->user_name);
}


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2VV8onm
via IFTTT

تعليقات

المشاركات الشائعة من هذه المدونة

I am unable to figure out how to create payment collection request, after a form has been submitted in laravel

laravel, mysql transaction not working after failed one time