0
Hello,
When performing a query in a field booleano
in the Postgres we have a return of 't'
or 'f'
.
I’m having a problem trying to migrate an API made in Codeigniter
for an API I am developing in Laravel 5.7
. The problem is that the Codeigniter
returns 't'
or 'f'
in consultations, and Laravel
returns true
or false
. I need to let the return of Laravel
equal to that of the Codeigniter
, because it is not feasible for me to touch the Front-End that consumes this API.
It would be ideal for me if it were possible to configure this in just one place of my application, without having to change all the queries that I am doing. It is also important to point out that I am not using the Eloquent
, I’m using the Query Builder
of Laravel
Example of the return of Codeigniter
[Line 5]
{
"id": "5794",
"valor_frete": 19.8,
"prazo_entrega": 6,
"exibe_prazoentrega": "t",
"destino": "RJ - Rio de Janeiro - Capital",
"transportadora": "Correios",
"nome": "PAC - Encomenda Normal",
"texto": "PAC - Encomenda Normal",
"frete_gratis": "Frete Grátis",
"valor_frete_original": 19.8
},
Example of the return of Laravel
[Line 7]
{
"id": 5794,
"nome": "PAC - Encomenda Normal",
"texto": "PAC - Encomenda Normal",
"destino": "RJ - Rio de Janeiro - Capital",
"transportadora": "Correios",
"exibe_prazoentrega": true,
"valor_frete": 19.8,
"prazo_entrega": 6,
"valor_frete_original": 19.8
},
Thank you.
how is it in the database ? that same line ?
– Bulfaitelo
If you have to create the same access modifier or even an append are things to think about. In Codeingniter as the guy did?
– novic
In Codeigniter it comes by default
– Jhonny
Sorry Jhonny how? if you can show this in your question? because if it is a given
char
for example in Laravel should also, maybe we need to understand how it is being recorded at the base if it has to demonstrate?– novic