How do i combine a HTML Select with a Switch statement

Viewed 482

I want to create a 'Sort By' List in which whatever list item is selected then my laravel php switch statement will come back with the correct query.. How do i do this?

So far i have

<select class="form-control" name="SortbyList" >
    <option value="1">Highest Avg</option>
    <option value="2">Lowest Avg</option>
    <option value="3">Another Sort option</option>
    <option value="2">another sort option</option>
</select>

How do i use this with a switch which will be place in my Laravel Controller?

3 Answers
Related