title: Object of class Illuminate\Support\Collection could not be converted to int
body: <p>I have condition in Controller with checks the value in database and based on this value is redirecting user to different login pages</p>
  
  <pre><code>public function getLogin() 
  {               
      $login = DB::table('login')-&gt;pluck('login');
      //var_dump($login);
      if ($login == 1) {
          return View::make('users.login');
      } else { 
          return View::make('users.login1');  
      }        
  }
  </code></pre>
  
  <p>When I go to login page I've got this error</p>
  
  <blockquote>
    <p>Object of class Illuminate\Support\Collection could not be converted to int</p>
  </blockquote>
  
  <p>When I <code>var_dump($login);</code> I get</p>
  
  <pre><code>object(Illuminate\Support\Collection)#304 (1) { ["items":protected]=&gt; array(1) { [0]=&gt; int(1) } }
  </code></pre>
  
  <p>How can I fix this error?</p>