View Composers: Attaching A Composer To Multiple Views

View::composer(
    ['profile', 'dashboard'],
    'App\Http\ViewComposers\MyViewComposer'
);
View::composer('*', function ($view) {
    //
});

You may attach a view composer to multiple views at once by passing an array of views as the first argument to the composer method.

View Composers: Attaching A Composer To Multiple Views — Structure map

Clickable & Draggable!

View Composers: Attaching A Composer To Multiple Views — Related pages: