title: Laravel Eloquent Search Form Query (Multiple parameters in form)
body: <p>I'm trying to query a DB in Laravel using Eloquent. When I click the submit button on my view my page is not going to the results page and I believe i'm not querying the database. I think there's an issue with my Controller handleIndex or my routes because i'm trying to render the query results onto the results page.</p>
  
  <p>Any ideas?</p>
  
  <p>Here's my Routes.php file:</p>
  
  <pre><code>//Bind route parameters.
  Route::model('game', 'Game');
  
  // Show pages.
   Route::get('/', 'GameController@index');
   Route::get('/results', 'GameController@results');
   Route::get('/profile/{$Game}', 'GameController@profile');
  </code></pre>
  
  <p>My GameController.php is as follows:</p>
  
  <pre><code>public function index()
      {
          //show view of homepage
          return View::make('index');
          }
  
      public function handleIndex()
      {   
          //Handle each query from index form submissions
          $Game = Game::query();
  
          if(Input::has('Industry_Type'))
          {
              $Game-&gt;where('Industry_Type', Input::get('Industry_Type'));
          }
          if(Input::has('Office_State'))
          {
              $Game-&gt;where('Office_State', Input::get('Office_State'));
          }
          if(Input::has('Local_Name'))
          {
              $Game-&gt;where('Local_Name', Input::get('Local_Name'));
          }
  
          return View::make('results');
          }
  
      public function results(Games $game)
      {
          //show search results from index form
  
          return View::make('results', compact('game'));
          }
  
      public function profile()
      {
          //show individual game proifile
          return View::make('profile');
          }
  
      }
  </code></pre>
  
  <p>Lastly, my views index.blade.php:</p>
  
  <pre><code>&lt;div class='main_search_form'&gt; 
  
  
      &lt;!--&lt;form action="login" method="get"&gt; --&gt;
  
          {{ Form::open(array('method' =&gt;'GET')) }}
          &lt;div&gt;
              &lt;div&gt;Find a Game to Join. Love the Work you do.&lt;/div&gt;
                  &lt;div&gt;Get Started&lt;/div&gt;
                  &lt;select id="jobclass"&gt;
                      &lt;option id="jobclass" name="jobclass" value="" disabled selected&gt;What Type of Work Do You Do?&lt;/option&gt;
                      &lt;option&gt;Truck Driver&lt;/option&gt;
                      &lt;option&gt;Web Developer&lt;/option&gt;
                  &lt;/select&gt;
              &lt;/div&gt;
              &lt;div&gt;
                  &lt;div&gt;In&lt;/div&gt;
                      &lt;input type="text" placeholder="Enter State" name=""&gt;
              &lt;div&gt;
                  &lt;div&gt;Search by Game&lt;/div&gt;   
                      &lt;input type="text" placeholder="Name A Game" name=""&gt;
              &lt;/div&gt;
          &lt;div&gt;   
              {{Form::submit('Find A Game', array('class' =&gt; 'btn')) }}
          &lt;/div&gt;
          {{ Form::close() }}
        &lt;!--  &lt;/form&gt; --&gt;
     &lt;/div&gt;
  </code></pre>