I have a view called side.balde.php which is like a sidebar. This side is called in to home and various other views using @include.
If i just return view side.balde.php with variables/data in my controller, then home view can't recognize the variables.
return view('incs/side',compact('users','etc'));
I can return this data with home view and all the @includes in home view can inherit this data. but the problem is I'm using this @include in few other pages.
how do I forward data to side.balde.php so all views calling side.balde.php can access the data.
'incs/side'works andcompact('users''etc')is missing a comma)