Quantcast
Viewing all articles
Browse latest Browse all 2

Answer by Remco Buddelmeijer for Laravel website feeded by api

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}})


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>