jeudi 23 décembre 2021

json_encode() returns false - Laravel Model Class

When i am trying to encode model class its not working. Its showing error named "Malformed UTF-8 characters"

$json_array = json_encode(Product::all()); // returns false
// json_last_error_msg() shows error message titled "Malformed UTF-8 characters, possibly incorrectly encoded"

Product title contains "Bengali Language". Sample given below

  [▼
  "id" => 4996
  "product_type" => "Goods"
  "name" => "আমাল"
  ]

How can i solve this error??



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3pkLp5e
via IFTTT

Aucun commentaire:

Enregistrer un commentaire