I'm using Eloquent to get some data from the database. My database has a column that uses the POINT
data type. The columns have values such as POINT(52.45083 -1.930546)
.
I require this data from the database which I then return as JSON. Including the POINT
data. But, Eloquent returns it in the following form:
array(7) {
["id"]=>
int(2)
["city_id"]=>
int(1)
["image"]=>
NULL
["name"]=>
string(20) "University of London"
["geo_coords"]=>
string(25) "ͯ���I@�h�^`V��"
["created_at"]=>
string(19) "2017-01-11 10:53:46"
["updated_at"]=>
NULL
}
Why is this?