title: Laravel eloquent SQL query with OR and AND with where clause
body: <p>I know that sql AND can be achieved by consecutive where clauses. and OR with where(condition,'OR'). 
  I want to choose all the messages from message table where sentTo = editor_id AND sentFrom= currentUser_id OR where sentTo = currentUser_id AND sentFrom = editor_id.
  I have this query which I am trying to get the result through,</p>
  
  <pre><code>    $this-&gt;data['messages'] = Message::where(function ($query) use($uId) {
          $query-&gt;where('sentTo', '=', $this-&gt;data['currentUser']-&gt;id)
              -&gt;orWhere('sentFrom', '=', $uId);
              })
      -&gt;where(function ($query) use($uId){
               $query-&gt;where('sentTo', '=', $uId)
                       -&gt;orWhere('sentFrom', '=', $this-&gt;data['currentUser']-&gt;id);
              })
      -&gt;get();
  </code></pre>
  
  <p>How can I do this? Please advice.</p>