title: Laravel-5.1 inject the current logged in user to my controller
body: <p>How can I inject the current logged in user model to my controller?</p>
  
  <p>For example, in my controller I currently have:</p>
  
  <pre><code>public function update(SaveAccountRequest $request)
  {
      $user = User::findOrFail(Auth::user()-&gt;id);
  
      $user-&gt;first_name = $request-&gt;get('first_name');
      $user-&gt;last_name = $request-&gt;get('last_name');
      $user-&gt;email = $request-&gt;get('email');
  
      if($request-&gt;has('password')) {
          $user-&gt;password = Hash::make($request-&gt;get('password'));
      }
  
      $user-&gt;save();
  
      return redirect('/admin/account')-&gt;with('success', 'Your details have been saved.');
  }
  </code></pre>
  
  <p>But instead of having this line:</p>
  
  <pre><code>$user = User::findOrFail(Auth::user()-&gt;id);
  </code></pre>
  
  <p>It would be nice just to inject the <code>User</code> model into my controller which loads in the already logged in user, so that I could us this instead:</p>
  
  <pre><code>public function update(SaveAccountRequest $request, User $user)
  {
      $user-&gt;first_name = $request-&gt;get('first_name');
      $user-&gt;last_name = $request-&gt;get('last_name');
      $user-&gt;email = $request-&gt;get('email');
  
      if($request-&gt;has('password')) {
          $user-&gt;password = Hash::make($request-&gt;get('password'));
      }
  
      $user-&gt;save();
  
      return redirect('/admin/account')-&gt;with('success', 'Your details have been saved.');
  }
  </code></pre>
  
  <p>How can I achieve this?</p>