Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function source()
- {
- $maps = Map::all();
- $arr = [];
- foreach($maps as $map) {
- $arr['markers'][] = [
- 'title' => $map->article->short_title_english,
- 'lat' => $map->latitude,
- 'lng' => $map->longitude,
- 'description' => $map->description_english,
- 'status' => $map->status,
- 'icon' => $map->icon
- ];
- }
- echo json_encode($arr);
- }
Advertisement
Add Comment
Please, Sign In to add comment