title: Return a variable to a view
body: <p>I have a question about Laravel. </p>
  
  <p>I have by example index.blade.php. In this file I want include the sidebar who is located on the file sidebar.blade.php. </p>
  
  <p>But now I want to send a variable from my controller(SidebarController) to the sidebar view: sidebar.blade.php.</p>
  
  <p>Like this:</p>
  
  <pre><code>class SidebarController extends Controller
  {
      public function news_widget() {
  
          $posts = Post::take(5)-&gt;orderBy('updated_at', 'DESC')-&gt;take();
      }
  }
  </code></pre>
  
  <p>How can I do that?</p>