I want to build a website which need to get gold price every 3 min and use with this price in many of my controller in my project. how can get gold price from another API and how use this in my controller?
use cronjob to send a request to the gold api, receive the results and save them to the databse, and after 3 minute check if the price for the gold exists, update price. After you have the data you can access it from all your controllers and methods.
Laravel Cron jon - Read here
Laravel HTTP Client - Read here
This is all you need to know to finish your task