View composers are nice but they have some problems accocsiated with them.
1- you never know where the data is coming from when you look at your html
2- They offer no easy way of caching the result.
You can use the "widget pattern" to have much better performance and structure in your apps + many more bonuses ! :)
I've written a package that allows you to connect with the last.fm API. With last.fm you can track which music you listen to. Through the API you can retrieve some cool statistics.
Checkout https://github.com/barryvanveen/lastfm for the full readme and more examples.
Lumen is a micro-framework built on top of Laravel. The framework is ideal for small apps and services that are optimized for speed. The most important application of the framework is to build REST APIs. This tutorial explains how REST API can be created using Lumen. https://www.cloudways.com/blog/creating-rest-api-with-lumen/
The following example shows an controller with a method, in which we change some values from the .env. Make sure, the entries you want to change, really exist in your .env.
https://github.com/Brotzka/laravel-dotenv-editor