title: How to send dynamic variable to partials page "sidebar"?
body: <p>I have a partial page "sidebar" that shows up in every page. There my logo is dynamic. To display my logo i have send variable through my dashboard controller but it says undefined variable.
  The problem seems to be in route because "/dashboard" is being called not the "sidebar"
  For sidebar i have wrote its part in dashboard controller
  So, how can i make this work?</p>
  
  <blockquote>
    <p>Undefined variable: logos (View:
    C:\xampp\htdocs\odan\resources\views\admin\partials\sidebar\sidebar.blade.php)
    (View:
    C:\xampp\htdocs\odan\resources\views\admin\partials\sidebar\sidebar.blade.php)
    (View:
    C:\xampp\htdocs\odan\resources\views\admin\partials\sidebar\sidebar.blade.php)</p>
  </blockquote>
  
  <p><strong>Dashboard controller</strong></p>
  
  <pre><code>public function sidebar()
  {
      $data['logos'] = Setting::first();
  
      return view('admin.layouts.app', $data);
  }
  </code></pre>
  
  <p><strong>Sidebar.blade.php</strong></p>
  
  <pre><code>&lt;!-- Brand Logo --&gt;
    &lt;a href="index3.html" class="brand-link"&gt;
      &lt;img src="{{asset('uploaded/'.optional($logos)-&gt;image)}}" alt="Odan Logo" 
       class="brand-image img-circle elevation-3" style="opacity:.8"&gt;
      &lt;span class="brand-text font-weight-light"&gt;Odan&lt;/span&gt;
    &lt;/a&gt;
  </code></pre>
  
  <p><strong>app.blade.php</strong></p>
  
  <pre><code>&lt;body class="hold-transition sidebar-mini layout-fixed"&gt;
  &lt;div class="wrapper"&gt;
    @include('admin.partials.navigation.navbar')
    @include('admin.partials.sidebar.sidebar')
    @yield('content')
    @include('admin.partials.footer.footbar')
  &lt;/div&gt;
  </code></pre>