dingo / api

A RESTful API package for the Laravel and Lumen frameworks.
BSD 3-Clause "New" or "Revised" License
9.32k stars 1.25k forks source link

response column that contains space in value ? #1710

Closed raindy29 closed 4 years ago

raindy29 commented 4 years ago
Q A
Bug? no
New Feature? no
Framework Laravel
Framework version 5.7.28
Package version 2,4
PHP version 7.1.32
Postgresql version 10.3

Actual Behaviour

Blank characters are automatically added when use character type field,How to remove space

{ "data": [ { "comp_no": "A ", "plat_no": "01 ", "pay1": "cash", ....

Expected Behaviour

{ "data": [ { "comp_no": "A", "plat_no": "01", "pay1": "cash", ....

Steps to Reproduce

return $this->response->array($response)->setStatusCode(200);

Possible Solutions

specialtactics commented 4 years ago

Hi

This is definitely not a Dingo problem, it would be more to do with your DB layer of your application, potentially the driver you are using (eg. mysqli vs mysqlnd)