title: Laravel: whereIn does not use given array as argument
body: <p>Here are two lines of code which looks quite the same.</p>
  
  <pre><code>   1: $q = \App\User::whereIn('id',[1,2,3]);
  
     2: $users = DB::table('users')-&gt;whereIn('id', array(1, 2, 3));
  </code></pre>
  
  <p>But its result are different.</p>
  
  <p>The line 1 does not select any result. Its collection is empty.
  The line 2 could select correct users where its user id is in the given range.</p>
  
  <p>Could someone give a reason why?</p>
  
  <p>Here is more output from command line.</p>
  
  <pre><code>&gt;&gt;&gt; $users = DB::table('users')-&gt;whereIn('id', array(1, 2, 3));
  =&gt; &lt;Illuminate\Database\Query\Builder #00000000201a36590000000030994e20&gt; {
         aggregate: null,
         columns: null,
         distinct: false,
         from: "users",
         joins: null,
         wheres: [
             [
                 "type"    =&gt; "In",
                 "column"  =&gt; "id",
                 "values"  =&gt; [
                     1,
                     2,
                     3
                 ],
                 "boolean" =&gt; "and"
             ]
         ],
         groups: null,
         havings: null,
         orders: null,
         limit: null,
         offset: null,
         unions: null,
         unionLimit: null,
         unionOffset: null,
         unionOrders: null,
         lock: null
     }
  
  &gt;&gt;&gt; $q = \App\User::whereIn('id',[1,2,3]);
  =&gt; &lt;Illuminate\Database\Eloquent\Builder #0000000018080e2500000000179a03c5&gt; {}
  </code></pre>
  
  <p>And here is the User.php</p>
  
  <pre><code>&lt;?php namespace App;
  
  use Illuminate\Auth\Authenticatable;
  use Illuminate\Database\Eloquent\Model;
  use Illuminate\Auth\Passwords\CanResetPassword;
  use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
  use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
  
  class User extends Model implements AuthenticatableContract, CanResetPasswordContract {
  
          use Authenticatable, CanResetPassword;
  
          /**
           * The database table used by the model.
           *
           * @var string
           */
          protected $table = 'users';
  
          /**
           * The attributes that are mass assignable.
           *
           * @var array
           */
          protected $fillable = ['name', 'email', 'password'];
  
          /**
           * The attributes excluded from the model's JSON form.
           *
           * @var array
           */
          protected $hidden = ['password', 'remember_token'];
  
  }
  </code></pre>
  
  <p>And here is the "get()" output.</p>
  
  <pre><code>&gt;&gt;&gt; \App\User::whereIn('id',[1,2,3])-&gt;get();
  =&gt; &lt;Illuminate\Database\Eloquent\Collection #000000007833eb04000000000d6d8434&gt; {}
  &gt;&gt;&gt; DB::table('users')-&gt;whereIn('id', array(1, 2, 3))-&gt;get();
  =&gt; [
         &lt;stdClass #000000007833eb1e000000000d6d8434&gt; {
             id: 1,
             name: "test",
             email: ****,
             password: ****,
             remember_token: null,
             created_at: "2015-03-23 03:32:32",
             updated_at: "2015-03-30 03:13:34",        
         }
  </code></pre>