I wanna show data in datatable. it always return "undefined offset". but when I do "dd()" the data is exist. this is my code :
->editColumn('role', function($data){
// dd($data->user->roles[0]['name']); //when I dd the data is exist
return $data->user->roles[0]["name"]; //always undefined offset here
}
)
pls anyone help me.. thanks in advance.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire