So I want to show post in data table but there is 2 layer of data, the data it look like this
[
{
created_at":
"id_post":1,
"name":"trying post",
"comment_all":
[
{
"id_user":3,
}
],
So I want to get comment_all, I use this code in blade
@foreach($compalls as $compall )
<tr>
<td>{{ $compall->coment_all->id_user }}</td>
</tr>
@endforeach
but I got this error
Property [id_user] does not exist on this collection instance. (View: directory/file.blade.php)
hope you can help me