what is the best way in your idea to have some partial views with data bound to each partial view. and each time in our views we just call the partial views and don't make data for it each time. creating data and pass it to partial views makes controller action dirty and its a work you do many time.I feel I am repeating my self. I know about laravel composer views but I think its not an appropriate way for this purpose.
View::share()is probably what you're looking for. It lets you share data across all views. Another approach would be to put the common data into a BaseController and let all necessary controllers extend it.View::share()does - it makes data available across all views, including the partials, of course. So you don't need to pass data from your parent view to the partial, it will be available there automatically. If you want a specific partial to load its own data, regardless of the parent view, then you shold have a look at view composers and this question: stackoverflow.com/questions/18546910/…