I would suggest using a ViewComposer
, in this way you can use the variables in your website. You can find more about ViewComposers
at the following link:
https://laravel.com/docs/5.6/views#view-composers
You can then use the ViewComposer
to do a request to your API and use that data. The data will then be assigned to your blade as a normal variable (such as {{$foo}}
)