title: How to call controller function from view file(from dropdown of onchange attribute)?
body: <p>This is my code:    </p>
  
  <pre><code>&lt;select style="background-color: #ffffa0" name="country" onChange=""&gt; 
              &lt;option value=""&gt;---select country--&lt;/option&gt; 
          &lt;?php  
               $rows=DB::table('country')-&gt;get();
               foreach ($rows as $row)
               {
                     echo "&lt;option value='$row-&gt;id'&gt; $row-&gt;country &lt;/option&gt;";    
               }         
           ?&gt;
      &lt;/select&gt;
  </code></pre>
  
  <p>How to call function of controller from onChange?</p>