How to store data in VueJS with Laravel 5.4

吃可爱长大的小学妹 提交于 2019-12-11 04:39:56

问题


Im building application like real time dashboard. Using many databases and external APIs.

(The first Idea was AJAX + Laravel Queues, but I found VueJS and It's interesting.)

The idea is to get the data in background with Laravel Queues from all sources and then storage it localy. Next step is getting this data with VueJS.

The problem I have is the storage part. I dont have idea and actually dont know how to store it so VueJS can efficiently get this data from storage and on the other hand Laravel can save the data to it the same.

There will be many users loging in a system so I created the MySQL database for them but dont know, if it's a good solution.

Thanks for advices!


回答1:


You create routes for Vue.js to make XHR(Ajax) requests to. If you want to save data this would be a post route. If you want to retrieve data this would be a get route.

How you handle the data you are sending or (directly)receiving is of no concern to Vue.js.

This would be a good start:

https://laracasts.com/series/learn-vue-2-step-by-step/episodes/18



来源:https://stackoverflow.com/questions/45338077/how-to-store-data-in-vuejs-with-laravel-5-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!