title: Pass $user object to a template file
body: <p>I'm using <code>layouts.app</code> as my template file for all my views. I want to send the user to its authenticated users profile (within my dropdown in the top-right corner of my menu), like so:</p>
  
  <pre><code>&lt;ul class="dropdown-menu" role="menu"&gt;
      &lt;li&gt;
          &lt;a href="{{ url('/users/' . $users-&gt;id) }}"&gt;@lang('user.profile')&lt;/a&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Unfortunately <code>$users</code> is undefined. How would I define <code>$users</code> without a controller?</p>
  
  <p><strong>Solution:</strong></p>
  
  <pre><code>&lt;ul class="dropdown-menu" role="menu"&gt;
      &lt;li&gt;
          &lt;a href="{{ url('/users/' . auth()-&gt;user()-&gt;id) }}"&gt;@lang('user.profile')&lt;/a&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>