title: laravel - make a search form and show result in same page
body: <p>in my show method in laravel i have a form that i want to submit and show the result on the same page so here is my show method first of all :</p>
  
  <pre><code> public function show(Property $property)
  {
  
      $property = Property::with('propertycalendars')-&gt;where('id', $property-&gt;id)-&gt;first();
      foreach ($property-&gt;propertycalendars as $prop) {
          $end_reserve = $prop-&gt;reserve_end;
      }
  //             HERE NEW RELATION
  
      $pdate = Property::with('dates')-&gt;get();
  
      return view('users.properties.show', compact('property','pdate','end_reserve'));
  }
  </code></pre>
  
  <p>and in the view of my show which for example is the url of a uniq property like below just as an example :</p>
  
  <pre><code>http://localhost:8000/properties/1
  </code></pre>
  
  <p>now i have a form to submit to search the Date table and bring me the dates so here is what i have wrote for the search function :</p>
  
  <pre><code>public function search (Request $request,$property_id){
  //Send an empty variable to the view, unless the if logic below changes, then it'll send a proper variable to the view.
  $results = null;
  
  //Runs only if the search has something in it.
  if (!empty($request-&gt;property_id)) {
      $start_date = $request-&gt;start_date;
      $search_date = Date::all()-&gt;where('date',$start_date);
  }
  return view('admin.properties.show')-&gt;with('search_date', $search_date);
  }
  </code></pre>
  
  <p>and 
  thats my route :</p>
  
  <pre><code>Route::get('/properties/{{property_id}}','PropertyController@search');
  </code></pre>
  
  <p>and finally my form to submit the search :</p>
  
  <pre><code>&lt;form action="/properties/search" method="get"&gt;
              {{csrf_field()}}
  
              &lt;div class="row"&gt;
              &lt;div class="col-lg-5"&gt;
                  &lt;input type="hidden" value="{{$property-&gt;id}}" name="property_id"&gt;
                  &lt;input  name="start_date"  class="form-control m-input start_date" autocomplete="off"&gt; &lt;/div&gt;
  
              &lt;div class="col-lg-5"&gt;
                  &lt;input  name="finish_date"  class="form-control m-input start_date" autocomplete="off"&gt; &lt;/div&gt;
  
              &lt;div class="col-lg-2"&gt;
                  &lt;input type="submit" value="seach" class="btn btn-primary btn-block" autocomplete="off"&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;/form&gt;
  </code></pre>
  
  <p>but now when i submit the form it returns a 404 not found with a link like below :</p>
  
  <pre><code>http://localhost:8000/properties/search?_token=R8ncSBjeZANMHlWMcbC6o5mYJZfwWgdfTwuviFo1&amp;property_id=1&amp;start_date=1398%2F1%2F12&amp;title=
  </code></pre>