title: Laravel 5.3 search MethodNotAllowedHttpException in RouteCollection.php line 218:
body: <p>I am working on laravel 5.3 search function that is supposed to search for service_provided in table called services</p>
  
  <p>below is my form</p>
  
  <pre><code>    @extends('layouts.app')
  @section('title', '| View Search Results')
  @section('content')
  &lt;div class="container"&gt;
  &lt;div class="flex-center position-ref full-height"&gt;
  
  
              &lt;div class="content"&gt;
                  &lt;div class="title m-b-md"&gt;
                      Service 
                  &lt;/div&gt;
                  {!! Form::open(['route' =&gt; 'search.create']) !!}
                  &lt;div class="container" id="SearchBox"&gt;
                  &lt;div class="col-xs-8 col-xs-offset-2"&gt;
  
                   &lt;div class="input-group"&gt;
  
                  {!! Form::text('search',null,array('class' =&gt; 'form-control','placeholder' =&gt; 'Search term...','aria-describedby' =&gt; 'basic-addon2')) !!}
                    &lt;span class="input-group-addon" id="basic-addon2"&gt;
                    {!! Form::submit('Search',array('class'=&gt; 'btn btn-default')) !!}
                    &lt;/span&gt;
                  &lt;/div&gt;
  
                  &lt;/div&gt;
                  &lt;/div&gt;
                  {!! Form::close() !!}
  
              &lt;/div&gt;
          &lt;/div&gt;
  &lt;/div&gt;
  
  @endsection
  </code></pre>
  
  <p>My Seach function create is as below</p>
  
  <pre><code>  public function create(Request $request)
      {
          //// Gets the query string from our form submission 
      $query = $request-&gt;input('search');
      // Returns an array of articles that have the query string located somewhere within 
      // our articles titles. Paginates them so we can break up lots of search results.
      $services = DB::table('services')-&gt;where('city', 'LIKE', '%' . $query . '%')-&gt;paginate(10);
  
      // returns a view and passes the view the list of articles and the original query.
      return view('search.search', compact('services', 'query'));
      }
  </code></pre>
  
  <p>my route is as follows</p>
  
  <pre><code>Route::get('search.index',array('as'=&gt;'index','uses'=&gt;'SearchController@index'));
  Route::get('search.create',array('as'=&gt; 'create','SearchController@create'));
  </code></pre>
  
  <p>The error message im getting when i submit the form is as below</p>
  
  <p>Whoops, looks like something went wrong.
  1/1 MethodNotAllowedHttpException in /home/archie/servicepap/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php line 218:</p>
  
  <pre><code>in RouteCollection.php line 218
  at RouteCollection-&gt;methodNotAllowed(array('GET', 'HEAD', 'PUT', 'PATCH', 'DELETE')) in RouteCollection.php line 205
  at RouteCollection-&gt;getRouteForMethods(object(Request), array('GET', 'HEAD', 'PUT', 'PATCH', 'DELETE')) in RouteCollection.php line 158
  at RouteCollection-&gt;match(object(Request)) in Router.php line 780
  at Router-&gt;findRoute(object(Request)) in Router.php line 610
  at Router-&gt;dispatchToRoute(object(Request)) in Router.php line 596
  at Router-&gt;dispatch(object(Request)) in Kernel.php line 267
  at Kernel-&gt;Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 53
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 46
  at CheckForMaintenanceMode-&gt;handle(object(Request), object(Closure)) in Pipeline.php line 137
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104
  at Pipeline-&gt;then(object(Closure)) in Kernel.php line 149
  at Kernel-&gt;sendRequestThroughRouter(object(Request)) in Kernel.php line 116
  at Kernel-&gt;handle(object(Request)) in index.php line 53
  at require_once('/home/archie/servicepap/public/index.php') in server.php line 21
  </code></pre>