我开发了一个应用程序,我计划与Angular 2和laravel进行实时对抗.例如,你按下"攻击"按钮,你的对手就会看到他的生命在实时下降.
My app built with:
frontend:角2
Backend: PHP Laravel 5.2
现在我正在搜索和学习我的实时作战组件,
- https://www.codetutorial.io/laravel-5-and-socket-io-tutorial/
- http://4dev.tech/2016/02/creating-a-live-auction-app-with-angular-2-node-js-and-socket-io/
The first tutorial is about how to use Laravel 5 and socket io.
The second one is how to use Angular 2 with NODS JS and socket io.
When I say real time, I mean that both users see the same thing that is happening on the screen)
My Backend and Frontend are totally divided and I have no setup with NodeJS anywhere in my app.
两个用户都需要在我的应用程序中看到战斗中发生的动作,它需要通过我的laravel API,并通过我的Angular 2 battle组件显示
My question is -
What's the best approach to real time app (seem websockets) using Angular2 and Laravel 5.2 to get the desired result of what I'm trying to achieve?