Skip to content

Commit

Permalink
Track geo spatial data
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Schöps committed Feb 17, 2021
1 parent 3019942 commit a4d7118
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public function up()
$table->string('browser_version')->index()->nullable();
$table->string('country')->index()->nullable();
$table->string('city')->index()->nullable();
$table->decimal('lat', 10, 7)->index()->nullable();
$table->decimal('lng', 10, 7)->index()->nullable();
$table->timestamps();
});

Expand Down
2 changes: 2 additions & 0 deletions src/Models/Visitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ public function fillInfo()
'browser_version' => $agent->version($browser),
'country' => $geo->country,
'city' => $geo->city,
'lat' => $geo->lat,
'lng' => $geo->lon,
]);

});
Expand Down

0 comments on commit a4d7118

Please sign in to comment.