i want to show my relationship values inside my result array. my results looks like this.
"counciler": [
{
"id": 1,
"name": "family",
"description": "test description here",
"created_at": "2020-04-16T07:57:31.000000Z",
"updated_at": "2020-04-16T07:57:31.000000Z",
"deleted_at": null,
"users": [
{
"id": 8,
"name": "stack change",
"email": "[email protected]",
"phone": "000000000",
"profile_image": null,
"address": null,
"user_type": "counciler",
"email_verified_at": null,
"created_at": "2020-04-16T13:32:51.000000Z",
"updated_at": "2020-04-16T13:32:51.000000Z",
"deleted_at": null,
"pivot": {
"category_id": 1,
"user_id": 8
}
}
]
}
]
my question is i want to get my users array details into a v-for for list all my users in that category. how can i achieve this one?
i also tried this one but not working
<div v-for="user in counciler.users" :key="user.id"></div>
councileris an array, so you will have tov-forover it before looping over the users