How to passing value from link in codeigniter
<p>My link in view page</p>

<pre><code>&lt;a href="&lt;?php echo base_url('baju_c/cari/'.$hasil-&gt;id)?&gt;" class="btn btn-default"&gt;Detail&lt;/a&gt;
</code></pre>

<p>My controller</p>

<pre><code>public function cari(){
    //what i'm doing here ? please help ?
}
</code></pre>

<p>My model</p>

<pre><code>function search_by_id($id){
        $query = $this-&gt;db-&gt;where('id',$id);
        $query = $this-&gt;db-&gt;get();
        return $query-&gt;result();
    }
</code></pre>

<p>How pass value from link to model and show the result to view again?</p>

<p>it's my first time using codeigniter, need some help</p>