title: How to get the id of a model in octobercms
body: <p>I am creating a popular list of categories in octobercms and have this</p>
  
  <pre><code>function onStart(){
  
  
  
  
  $cat = Cat::find($id)-&gt;increment('view_count'); //&lt;--&gt; How do i get this $id so it increments the category view_count using the id?
  
   $this['trending'] = Cat::orderBy('view_count')-&gt;where('parent_id', '&gt;', 0)-&gt;take(10)-&gt;get(); 
  
  
  
  }
  </code></pre>
  
  <p>How do i retrieve the $id to use in the query?</p>