title: Laravel closure, what is $query, how is $query passed?
body: <p>I don't understand this construct:</p>
  
  <pre><code>$posts = Post::where(function($query)
          {
              $query-&gt;where('title', 'LIKE', "%search%")
                    -&gt;orWhere('body', 'LIKE', "%search%");
          });
  </code></pre>
  
  <p>Does the function pass $query to itself? Or does $query represent an object that was instantiated elsewhere in the code?</p>