Laravel: how to pass data from controller into multiple views? – AppServiceProvider

https://laracasts.com/series/laravel-from-scratch-2017/episodes/21

ery quickly, you’ll encounter the situation when multiple views require the same piece of data. For example, if a sidebar widget requires a particular variable for every single page, well we can’t be expected to pass that data from every single controller. No, instead, we can leverage view composers.

Blogbook : PHP | Javascript | Laravel | Corcel | CodeIgniter | VueJs | ReactJs | WordPress