title: Laravel 5.2 - Simple Select Query returns empty array
body: <p>I'm running a simple query, but for some reason it's not giving me the correct output.</p>
  
  <p>The user is supposed to give multiple answers to a question through checkboxes. With those answer I try to get the ID's of them out of my DB.</p>
  
  <p><strong>Here's the code I'm using:</strong></p>
  
  <pre><code>foreach($foodtrucktypes as $foodtrucktype)
  {
      $type_id = DB::table('foodtruck_types')
          -&gt;select('id')
          -&gt;where('type', '= ', $foodtrucktype)
          -&gt;get();
      echo $foodtrucktype."&lt;br /&gt;";
      var_dump($type_id);
      echo "&lt;br /&gt;";
      echo "&lt;br /&gt;";
  }
  
  foreach($locations as $location)
  {
      $location_id = DB::table('locations')
          -&gt;select('id')
          -&gt;where('name', '=', $location)
          -&gt;get();
  
      echo $location."&lt;br /&gt;";
      var_dump($location_id);
      echo "&lt;br /&gt;";
      echo "&lt;br /&gt;";
  }
  
  foreach($partytypes as $partytype)
  {
      $party_id = DB::table('party_types')
          -&gt;select('id')
          -&gt;where('party_type' ,'=', $partytype)
          -&gt;get();
  
      echo $partytype."&lt;br :&gt;";
      var_dump($party_id);
      echo "&lt;br /&gt;";
      echo "&lt;br /&gt;";
  }
  </code></pre>
  
  <p><strong>and this is the response I get:</strong></p>
  
  <blockquote>
    <p>Comfort Food array(0) { } </p>
    
    <p>Desserten array(0) { } </p>
    
    <p>Fastfood array(0) { } </p>
    
    <p>Henegouwen array(1) { [0]=> object(stdClass)#195 (1) { ["id"]=> int(2)
    } } </p>
    
    <p>Limburg array(1) { [0]=> object(stdClass)#196 (1) { ["id"]=> int(3) }
    } </p>
    
    <p>Bedrijfsfeest array(1) { [0]=> object(stdClass)#194 (1) { ["id"]=>
    int(1) } } </p>
    
    <p>Communiefeest array(1) { [0]=> object(stdClass)#197 (1) { ["id"]=>
    int(2) } }</p>
  </blockquote>
  
  <p>So the code works, except for the first foreach (foodtruck types), it returns empty arrays and I can't see why.</p>
  
  <p><strong><a href="https://gyazo.com/673bbf1a6cd47260a864d968b49d8531" rel="nofollow">Here's a pic of the DB</a></strong></p>