title: Share location from Flutter real-time to Laravel using Redis and socket.io
body: <p>I'm trying to share the user's live location from Flutter app. to Laravel admin page to keep track of the driver/trip in <strong>real-time</strong>, now I get the location in Flutter as implemented below</p>
  <pre><code>Future&lt;void&gt; getLocationLiveUpdates() async {
      mainJson[&quot;trip_id&quot;] = 5;
      homeTabPageStreamSubscription = Geolocator.getPositionStream(distanceFilter: 1,).listen((Position position) {
        currentPosition = position;
        liveLocationPoints.add({
          'latitude': position.latitude,
          'longitude': position.longitude,
          'speed': position.speed,
          'timestamp': position.timestamp!.toIso8601String(),
        });
  
  
        LatLng latLng = LatLng(position.latitude, position.longitude);
        _googleMapController.animateCamera(CameraUpdate.newLatLng(latLng));
      });
    }
  </code></pre>
  <p>In Laravel I do have a setup for Redis &amp; socket.io, I want to know what is the best way to share the location in <strong>real-time</strong> from Flutter to Laravel, and if it's possible using Redis &amp; socket.io</p>
  <p>should I open a socket inside the <code>.listen((Position position) {}</code> and send the data to the Laravel-socket.io and from there publish it on Redis channel and listen to it from Laravel?
  or what is the best implementation should be here?
  or should I open a socket on the client-side and read the data from there?
  or if there are other better options?</p>
  <p>thanks in advance.</p>