title: open route .show when onchange a dropdown
body: <p>In my view tests.index is it possible to open my route tests.show by clicking in a select dropdown where datas comes from database ?</p>
  
  <p>My controller :</p>
  
  <pre><code>public function index(Request $request)
  { 
    $tests = DB::table('test')-&gt;distinct()-&gt;get();
    return view('tests.index')-&gt;with('tests', $tests);
  }
  
  public function show($id)
  { 
    $test = Test::findOrFail($id); 
    return view('tests.show', compact('test')); 
  }
  </code></pre>
  
  <p>My view index :</p>
  
  <pre><code> &lt;select id="apports" type="dropdown-toggle" class="form-control" name="apports" onchange="{{ route("tests.show", $test-&gt;id) }}"&gt;
  &lt;option value="choisir" selected disabled&gt;Choisir&lt;/option&gt;
  @foreach($tests as $test)
  &lt;option class="apports" value="{{$test-&gt;id}}"&gt;{{$test-&gt;apports}}&lt;/option&gt;
  @endforeach
  </code></pre>
  
  <p></p>
  
  <p>When I put my route here : <code>onchange</code> I get the error "Undefined variable: test"
  when I add a button below the select like that :</p>
  
  <pre><code>&lt;a class="btn btn-small btn-success" href="{{ route("tests.show", $test-&gt;id) }}"&gt;Show&lt;/a&gt;
  </code></pre>
  
  <p>I get always the last id of the table...</p>
  
  <p>I would prefer not have a button, just when I change value in the select, return tests.show... Is someone could help me please ?</p>