Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

joaogl's avatar

Synchronizing Databases

Hello everyone!

Ok, so first of all.... I know this is a pretty complicated topic and that's way I'm just seeking a few tips and suggestions... I got a Laravel application which is being fed with data from 2 mobile devices. Both mobile devices have mobile app that I created and have a small local database to keep the app going when there's no internet connection.

I need the mobile devices to have the last 10000 records of a Laravel table and have them updated at all time. Also, the mobile device can create records and send them to the Laravel.

Currently I'm doing this the hard and old way but its was the fastest thing I could implement and now that I have the time I need to upgrade it to a decent workflow.

I currently have a api web method which given the last updated date returns the top 10000 records filtered by modified_at and created_at. The mobile app then adds this records to its internal database. For the sending process I'm doing the same, picking all the records that have been created or changed from the local database and sending them to another web api method.

This has a lot of problems including loss of id's which I'm not enjoying.

I'm here seeking for some tips and hoping to find better ways of doing this... I was thinking in using Firebase to keep all the 10000 records synchronized between the mobile devices, but I'm having a little throuble understanding how I'm going to get this into and from the Laravel in a almost real time experience. (Delays should not be bigger then 5 seconds)

I'm not the best person writing english, but I hope I made myself clear enough to get some help.

Thanks in advance, Joao Lourenço.

0 likes
0 replies

Please or to participate in this conversation.