问题
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