title: unexpected value exception in laravel
body: <p>I got Following Error in Laravel. <strong>UnexpectedValueException</strong> <strong>The Response content must be a string or object implementing __toString(),&quot;boolean&quot; given.</strong> </p>
  
  <p>My Helper Code is : </p>
  
  <pre><code>function checkunitconversionexist($itemid,$itemunits){
  
      for($i=0; $i&lt;count($itemid); $i++){     
  
      $finditemsinfos=DB::table('items')-&gt;Where('id',$itemid[$i])-&gt;first();   
  
  
      if($finditemsinfos-&gt;unit == $itemunits[$i]){        
  
      return 1;
  
      } else { 
  
      $chkunitconversionexist=DB::table('unitconversion')-&gt;Where('itemsid',$itemid[$i])-&gt;Where('unit_name',$finditemsinfos-&gt;unit)-&gt;Where('subunit_name',$itemunits[$i])-&gt;get();
  
      if(count($chkunitconversionexist) &gt; 0){ 
  
      return 1;
  
      } else {    
  
      return 0;   
  
      }
  
  
      }
  
      }   
  }
  </code></pre>