title: Retrieving input from Form Select - Laravel
body: <p>When I select a class from in my view and click on <code>Genrate</code>, I try to retrieve the value of the selected class but I am not able to get the value of the class selected.</p>
  
  <p>When I return <code>$condition</code>, it returns empty. In the url after submitting, it shows like <code>http://localhost:8000/generate/timetable?class=</code> </p>
  
  <p>Why is this happening?</p>
  
  <pre><code>&lt;div class="row"&gt;
      &lt;div class="col-xl-4 col-lg-12 col-md-12 mb-1"&gt;
          &lt;fieldset class="form-group"&gt;
              &lt;label for="squareText"&gt;Type&lt;/label&gt;
              {{ Form::select('class',$classes,$selectedClass,['class'=&gt;'form-control','required'=&gt;'true'])}}
              &lt;br&gt;
              &lt;a href="/generate/timetable?class={{ request('class') }}"&gt;&lt;button class="btn btn-primary pull-left square"  type="submit"&gt;&lt;i class="glyphicon glyphicon-th"&gt;&lt;/i&gt; Generate&lt;/button&gt;&lt;/a&gt;
          &lt;/fieldset&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>$condition = Input::get('class');
  if (!isset($condition['class']))
      $condition['class'] = 0;
  $courses = $course-&gt;where('class',$condition)-&gt;get()-&gt;toArray();
  return $condition;
  </code></pre>