select(["id","isVal" /> select(["id","isVal" /> select(["id","isVal"/>

How to force data type maddping for select using Mysql and Illuminte Query Builder

54 Views Asked by At

I need to create a select query using Illuminate QB and Mysqsl specifying the data type of some column:

$data=DB:table("mytable")->select(["id","isValid"])->get();

With the current configuration the "isValid" field is mapped as a string of value "1" and I need an int. Is there any chance to set the data type for PDO fetch?

0

There are 0 best solutions below