title: Using whereRaw() and orWhereRaw() with Join in laravel 5.2
body: <p>I am writing a code like this:-</p>
  
  <pre><code>$results = User::select('users.id','users.user_type','users.status','homechef_details.user_id','homechef_details.address1','homechef_details.name','homechef_details.updated_rating')
          -&gt;join('homechef_details', function($query) use ($rating,$keyword) {
              $query-&gt;on('users.id', '=', 'homechef_details.user_id');
              $query-&gt;where('users.status','=',1);
              if(isset($rating) &amp;&amp; !empty($rating)) 
              {
                  if(count($rating)==1)
                      $query-&gt;whereRaw('FLOOR(homechef_details.updated_rating) = '.$rating[0]);
                  else if(count($rating)&gt;1)
                  {
                      $query-&gt;where(function($q) use($rating)
                      {
                          $q-&gt;whereRaw('FLOOR(homechef_details.updated_rating) = '.$rating[0]);
                          for($r = 1; $r &lt; count($rating); $r++)
                          {
                             $q-&gt;orWhereRaw('FLOOR(homechef_details.updated_rating) = '.$rating[$r]);
                          }
                      });
                  }
              }
          })-&gt;get();
  </code></pre>
  
  <p>I need to check the floor value of the column value in the where clause. I am getting this error:-</p>
  
  <pre><code>Call to undefined method Illuminate\Database\Query\JoinClause::whereRaw()
  </code></pre>
  
  <p>How can I fix this error?</p>