How to update a front-end list as items are added to the back-end (Laravel / MySQL)
In a nutshell, an app (built on Laravel) allows users to list physical items for sale, and then, whilst the sale is underway, to request that an admin edit the price of an item – that would involve the admin physically finding the item, adjusting the price, and then marking the price as having been changed.
What I envisage is a screen for the admin which shows a list of all current, unfulfilled, edit requests – they can then make the edit requested and mark it as done, removing it from the list.
My question is what would be the best way to allow that screen to be open on a computer the whole time, but have it updated as soon as (or relatively shortly after) a new edit request is received?
Presumably the page could update the list via an Ajax call every five seconds or so, but is there a better way of doing it?
from Laravel Questions and Answers https://laravelquestions.com/php/how-to-update-a-front-end-list-as-items-are-added-to-the-back-end-laravel-mysql/
via Lzo Media
No comments:
Post a Comment