title: What wrong in my code with Laravel 4.2 Eloquent ORM
body: <p>When the below is executed: </p>
  
  <pre><code>$user = User::where('email','=',$email)-&gt;take(1)-&gt;get();
  Auth::login($user);
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>Argument 1 passed to Illuminate\Auth\Guard::login() must implement interface Illuminate\Auth\UserInterface, instance of Illuminate\Database\Eloquent\Collection given ...
  </code></pre>
  
  <p>I have tried changing this to:</p>
  
  <pre><code>$user = User::where('email','=',$email)-&gt;take(1)-&gt;get();
  $userid = $user-&gt;id;
  $user=User::find($userid);
  Auth::login($user);
  </code></pre>
  
  <p>But then I get the error:</p>
  
  <pre><code>Undefined property: Illuminate\Database\Eloquent\Collection::$id
  </code></pre>