Faced such a problem that the data should be updated in real time, and not after updating the page, I understand that this needs to be done with the help of ajax, but is not very familiar with it. There is data that is obtained from the database and stored in the php variable. The game is like a roulette, the user presses the start and makes a bet, the database shows the total number of games, and the total amount of all the bets, my question is: how to ensure that these data are updated when they change without reloading?
<div class="tab_content"> <div class="tab_left_content"> <p class="totalBidGame">{!! $TotalBidLuckyGame !!}</p> </div> <div class="tab_right_content" style="display:none"> <p class="totalGame">{!! $LuckyGame !!}</p> </div> </div>