array:4 [▼
0 => Illuminate\Database\Eloquent\Collection {#1745 ▼
#items: array:1 [▼
0 => App\ServiceOrder {#1736 ▶}
]
1 => Illuminate\Database\Eloquent\Collection {#1748 ▼
#items: []
}
2 => Illuminate\Database\Eloquent\Collection {#1746 ▼
#items: []
}
3 => Illuminate\Database\Eloquent\Collection {#1752 ▼
#items: []
}
]
when i query i got this type of code format. but i cannot get view this in my blade file. i am using yaijra datable package and i can view if i got only one array but here i got double array. i am confused how to solved it.
return Datatables::of($test)
->addColumn('service', function ($row) {
$service = $row->service);
return $service;
})
->addColumn(
'action',
function ($row) {
html.="..."
})
->rawColumns(['service', 'action'])
->make(true);
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire