title: Property accessed via magic method Illuminate\Http\Request object Laravel
body: <p>I am taking over a previously written Laravel application and trying to learn how various things are fit together. While doing so, I found the following piece of code:</p>
  <pre class="lang-php prettyprint-override"><code>class MyController extends Controller
  {
      public function index(Request $request)
      {
          if ($request-&gt;popular) {
              //....
          }
          //...
      }
  </code></pre>
  <p>I am not quite sure what the if-statement is trying to access. When I hover over the <code>$request→popular</code> part, it says that <code>popular</code> attribute is being accessed through magic method. I am also not able to find any attribute/method named popular anywhere else in the code. Does anybody know what this might be trying to do?</p>
  <p>I know that the attribute <code>popular</code> is not internal to the <code>Request</code> object because later in the code, the programmer is also accessing various other attributes using this magic method format.</p>
  <p>Is it some sort of shorthand way of accessing a URI? (<em>e.g.,</em> perhaps <code>/api/popular</code>)</p>