title: use of returning $this inside a method
body: <p>I am using Laravel and eclipse as my IDE. I am using the laravel-ide-helper package for autocompletion.</p>
  
  <p>I am calling methods from an eloquent model object.</p>
  
  <p>When I type in</p>
  
  <pre><code>User::find
  </code></pre>
  
  <p>eclipse provided me with:</p>
  
  <p>find($id, $columns) : \Illuminate\Database\Eloquent\Model.</p>
  
  <p>which means the "find" method returns an \Illuminate\Database\Eloquent\Model instance.</p>
  
  <p>However, when I type in </p>
  
  <pre><code>User::where
  </code></pre>
  
  <p>eclipse provided me with the following:</p>
  
  <pre><code>where($column, $operator, $value, $boolean) : $this
  </code></pre>
  
  <p>which means the function "where" returns</p>
  
  <pre><code>$this
  </code></pre>
  
  <p>Now, I don't really know what $this means because as I understand it "where" should return a query builder instance. As far as I know, $this means the object caller of the method (in this context, the User model itself). But it clearly does not return the model. I suspect that I do not understand what $this means in this context.</p>
  
  <p>What am I missing?</p>