Here when i echo the $TagDatas; from the below query
$TagDatas = TagModel::whereIn('TagId', explode(',', $BlogData->Tagged))->get(); echo $TagDatas;
I am getting
[{"AutoId":2,"TagId":2,"TagName":"chrome","TagDescription":null,"CreatedAt":null,"CreatedBy":null,"UpdatedAt":null,"UpdatedBy":null,"IsDeletable":null,"Status":1},{"AutoId":3,"TagId":3,"TagName":"google","TagDescription":null,"CreatedAt":null,"CreatedBy":null,"UpdatedAt":null,"UpdatedBy":null,"IsDeletable":null,"Status":1}]
But when i try
echo $TagDatas->TagName;
I am getting Undefined property: Error
What is the mistake i am doing and How can i do it.
Note :
I am using whereIn where the query will be equal to
$BlogData->Tagged i.e., It will be 2,3
So the Query will be
$TagDatas = TagModel::whereIn('TagId', array(2,3))->get();