Example #1
0
 public static function newLog($deviceId, $longitude, $latitude, $locationTime)
 {
     $log = new LocationLog();
     $log->device_id = $deviceId;
     $log->longitude = $longitude;
     $log->latitude = $latitude;
     $log->location_time = $locationTime;
     $log->created_at = Carbon::now()->toDateTimeString();
     $log->save();
     return $log;
 }