title: Redirect to wrong action when validation fails after form submission in laravel 5.0
body: <p>I have two form in one view when I leave the text field empty it redirects to wrong action. I am looking forwrad for the solution  of this problem. Thanks in hope. 
  Form one works fine when I enter data in ll the input fields. /inquiry/store also contains http request validation.</p>
  
  <p>View code which contains two forms.</p>
  
  <pre><code> &lt;div class="col-lg-6"&gt;
  
          {!! Form::open(['role' =&gt; 'form', 'url' =&gt; '/inquiry/store', 'class' =&gt; 'form-horizontal', 'method'=&gt;'POST']) !!}
          &lt;div class='form-group'&gt;
              {!! Form::label('name', 'Student Name *', ['class' =&gt; 'control-label col-md-4']) !!}
              &lt;div class="col-md-8"&gt;
                  {!! Form::text('name', $student-&gt;name,['autocomplete'=&gt;'off' , 'placeholder' =&gt; 'Student Name', 'class' =&gt; 'form-control']) !!}
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class='form-group'&gt;
              {!! Form::label('father_name', 'Father Name *', ['class' =&gt; 'control-label col-md-4']) !!}
              &lt;div class="col-md-8"&gt;
                  {!! Form::text('father_name',$student-&gt;father_name, ['autocomplete'=&gt;'off' , 'placeholder' =&gt; 'Father Name', 'class' =&gt; 'form-control']) !!}
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
              {!! Form::label('class', 'Class', ['class' =&gt; 'control-label col-md-4']) !!}
              &lt;div class="col-md-8"&gt;
                  {!! Form::text('class', $student-&gt;admission_class,['autocomplete'=&gt;'off' , 'placeholder' =&gt; 'Class', 'class' =&gt; 'form-control']) !!}
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
              {!! Form::label('roll_no', 'Roll Number', ['class' =&gt; 'control-label col-md-4']) !!}
              &lt;div class="col-md-8"&gt;
                  {!! Form::text('roll_no', $student-&gt;roll_no,['autocomplete'=&gt;'off' , 'placeholder' =&gt; 'Roll Number', 'class' =&gt; 'form-control']) !!}
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
              {!! Form::label('date', 'Date',['class' =&gt; 'control-label col-md-4']) !!}
              &lt;div class="col-md-8 date"&gt;
                  &lt;div class="input-group input-append date" id="dateRangePicker"&gt;
                      {!! Form::input('date', 'date', null, ['autocomplete'=&gt;'off' , 'placeholder' =&gt; 'Date of Birth', 'class'=&gt;'form-control col-height datepicker']) !!}
                      &lt;span class="input-group-addon add-on"&gt;&lt;span class="glyphicon glyphicon-calendar"&gt;&lt;/span&gt;&lt;/span&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
              {!! Form::label('teacher_name', 'Teacher Name', ['class' =&gt; 'control-label col-md-4']) !!}
              &lt;div class="col-md-8"&gt;
                  {!! Form::select('teacher_name', $teacher, ['autocomplete'=&gt;'off' , 'placeholder' =&gt; 'Teacher Name', 'class' =&gt; 'form-control']) !!}
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
              {!! Form::label('remarks', 'Remarks', ['class' =&gt; 'control-label col-md-4']) !!}
              &lt;div class="col-md-8"&gt;
                  {!! Form::textarea('remarks', null, ['autocomplete'=&gt;'off' ,
                  'placeholder' =&gt; 'Remarks',
                  'class' =&gt; 'form-control']) !!}
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
              &lt;div class="col-xs-offset-3 col-md-12"&gt;
                  {!! Form::submit('Save', ['class' =&gt; 'btn btn-primary']) !!}
                  &lt;input type="reset" class="btn btn-default" value="Reset"&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          {!! Form::close() !!}
  </code></pre>
  
  <p>second form for searching the student. When I submit the first form with out some empty field it redirect to /inquiry/search_stu. and displays MethodNotAllowedHttpException .</p>
  
  <pre><code>&lt;form role="form" id="search_form" action="/inquiry/search_stu" method="post"  class="form-inline"&gt;
              &lt;div class='form-group'&gt;
                  &lt;label class="control-label col-md-4"&gt;Search Student *&lt;/label&gt;
                  &lt;input class="form-control" type="text" name="search" placeholder="Admission No" required&gt;
              &lt;/div&gt;
              &lt;input type="hidden" name="_token" value="{{ csrf_token() }}"&gt;
              &lt;div class='form-group'&gt;
                  &lt;input type="submit"  form="search_form" class="btn btn-primary" name="submit"&gt;
                  &lt;input type="reset" class="btn btn-default"&gt;
              &lt;/div&gt;
  
          &lt;/form&gt;
  </code></pre>
  
  <p>Controller function for search student. </p>
  
  <pre><code> public function search_student(Request $request)
  {
      $teacher = \App\Teacher::lists('name', 'name');
     $adminid = $request['search'];
      $student = Admission::where('admission_no',$adminid)-&gt;first();
      return View::make('/inquiry/create', ['student'=&gt; $student,'teacher' =&gt; $teacher]);
  }
  </code></pre>
  
  <p>When I submit the store form it redirects to search student.</p>
  
  <p>store function .</p>
  
  <pre><code>public function store(Requests\StoreInquiryRequest $request) {
  
      $input = Input::all();
      $inquiry = new Inquiry();
      $inquiry-&gt;name = $input['name'];
      $inquiry-&gt;father_name = $input['father_name'];
      $inquiry-&gt;date = $input['date'];
      $inquiry-&gt;class = $input['class'];        
      $inquiry-&gt;teacher_name = $input['teacher_name'];
      $inquiry-&gt;roll_no = $input['roll_no'];
      $inquiry-&gt;remarks = $input['remarks'];        
  
      try {
          $inquiry-&gt;save();
          return redirect()-&gt;to('inquiry')-&gt;with('message', 'success| Student details have been saved.');
      } catch (Exception $ex) {
          \Log::error($ex);
          return redirect()-&gt;to('inquiry')-&gt;with('message', 'error| There was an error adding new student, please try again later.');
      }
  }
  </code></pre>
  
  <p>Http request for validation when wants to store data</p>
  
  <pre><code>  public function rules()
  {
      $cid = \Route::input('id');
      $isEdit = isset($cid) ? true : false;
      $rules = array(
          'name' =&gt; 'required|string|Max:50',
          'father_name' =&gt; 'required|string|Max:50',
          'class' =&gt; 'required|string|Max:50',
          'date' =&gt; 'required|date|Max:50',
          'teacher_name' =&gt; 'required|string|Max:50',
          'remarks' =&gt; 'required',
          'roll_no' =&gt; 'required',
      );
      return $rules;
  }
  </code></pre>