title: Get value of dropdownlist in view and use in controller Laravel
body: <p><br>
  I have a dropdownlist in my view:</p>
  
  <pre><code>&lt;form action="./sort" method="post"&gt;
          &lt;div class="sort-dropdown"&gt;
              &lt;select name="sort"&gt;
                  &lt;option value=""&gt;Sort&lt;/option&gt;
                  &lt;option value="asc"&gt;Ascending&lt;/option&gt;
                  &lt;option value="desc"&gt;Descending&lt;/option&gt;
              &lt;/select&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>I want to get the value when user choose in dropdownlist, in my controller, I tried:</p>
  
  <pre><code>$sort = $request-&gt;sort;
  </code></pre>
  
  <p>But when I choose in dropdownlist and use dd($sort), it return null. How I can get the value? Thank you!</p>
  
  <p>Update:
  Here is my full controller:</p>
  
  <pre><code>public function search(Request $request) {
      $search = $request-&gt;get('search');
      $sort = $request-&gt;sort;
  
      dd($search, $sort);
      die;
  
      $result = $this -&gt; model -&gt; getSearch($search, $sort);
  
      $processData['processData'] = $result;
  
      return view('datatracking', $processData);
  
  }
  </code></pre>