samedi 28 janvier 2017

Laravel - How to access child array key value pair in laravel controller

My response code :

Shpping : [    
{
"id": "1",
"name": "Dress",
"deleted_at": null,
"created_at": null,
"updated_at": null,
"minicomp": [
  {
    "id": "1",
    "cname": "basic",
    "base_id": 44
  },
  {
    "id": "2",
    "cname": "Shirt",
    "base_id": 177444
  },
  {
    "id": "3",
    "cname": "Pants",
    "base_id": 444
   } 
  ]
 }
];

What I want : I want to acces base_id of of every object in child array 'minicomp' whose parent is 'Shipping'. How to access it. Help me



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire