how to encode id in laravel api code example
Example: encode in laravel api
//In base controller
protected function jsonResponse($data, $code = 200)
{
return response()->json($data, $code,
['Content-Type' => 'application/json;charset=UTF-8', 'Charset' => 'utf-8'], JSON_UNESCAPED_UNICODE);
}
//In your controller
$this->jsonResponse($data);