You can use Laravel's Http Client to fetch data from the API. You can do this in a Command, or a Job, which may be scheduled if needed. Everything else is just PHP code to handle the JSON payload (it will be available as a PHP array whenever you use the json method on the Response) that is returned by the client.
Apr 30, 2021
1
Level 1
Get data from Api to Database
Hi
What would be the correct way to store my userdata get from API in the database?
I want to get my movie data stored in TMDB (https://developers.themoviedb.org/3)
I can get the data via axios in front with Vue. But my intention is to have my userdata (ratings, lists) stored in the backend to show. I have more than 2000 ratings and I need to store firstly.
Thanks in advance
Level 104
2 likes
Please or to participate in this conversation.