It's just encoded.
if you run it through json_decode it will decode properly :)
Hi Sirs,
I'm querying the database as follows:
$results = auth()->user()->client->transactions()
->select('paymentType', DB::raw('COUNT(paymentType) as qty'))
->whereDate('confirmationDate', '>=', $baseDate)
->whereIn('status', ['Aprovada','Completa'])
->groupBy('paymentType')
->pluck('qty','paymentType');
The Json string returned is:
"["Boleto Banc\u00e1rio","Cart\u00e3o de Cr\u00e9dito","Paypal"]"
And should be:
"["Boleto Bancário","Cartão de Crédito","Paypal"]"
Any clue in how to fix this?
Regards,
IDK why its not working for you but this code work prefectly for me
$array=["Boleto Bancário","Cartão de Crédito","Paypal"];
echo json_encode($array,JSON_UNESCAPED_UNICODE);
you can check the screenshot https://snag.gy/YPD6Ig.jpg
Please or to participate in this conversation.