Dec 31, 2017
0
Level 1
Point type format in pagination
Hi, I used laravel pagination to show jobs with a geolocation datatype based on tags.
Usually, when I do a paginate directly to the Jobs Model (without Tags) it give me objects with the location column in a correct format ("location" => "POINT(-16.405171 -71.4833536)")
But I need a function to search jobs based on tags (There's a many to many relationship beetween jobs and tags). So, I did the following function:
public function busquedaTags($tag){
$tag_act = Tag::where('nombre','=',$tag)->first();
$trabajos=$tag_act->trabajos()->paginate(6);
return dd($trabajos);
}
The result of location column after the paginate is something weird:
"location" => b"\x00\x00\x00\x00\x01\x01\x00\x00\x00¡IbI¹g0ÀÙ\x19ðCïÞQÀ"
Please or to participate in this conversation.