title: How to make the form submit with the following code in laravel?
body: <p>I have used the below code for form submission and validation, but form is not getting submitted when it gets validated.</p>
  
  <pre><code>  &lt;form action = "/edit/{{$users[0]-&gt;id}}" id="myform" method = "post"&gt;
    &lt;input type = "hidden" name = "_token" value = "{{csrf_token()}}"&gt;
  
    &lt;div class="form-group"&gt;
       &lt;label for="Name"&gt;Name&lt;/label&gt;
       &lt;input id="my-input" name="name" class="form-control left" value="{{$users[0]-&gt;name}}" type="text"&gt;
    &lt;/div&gt;
  
    &lt;div class="form-group"&gt;
      &lt;label for="url"&gt;Name of the Link&lt;/label&gt;
      &lt;input type="text" name="url" id="url" class="form-control" value = "{{$users[0]-&gt;url}}" aria-describedby="helpId"&gt;
    &lt;/div&gt;
  
    &lt;div class="form-group"&gt;
      &lt;label for="Category"&gt;Category&lt;/label&gt;
      &lt;select name="category" class="form-control"&gt;
      &lt;option value="&lt;?php echo $users[0]-&gt;category; ?&gt;" selected&gt;&lt;?php echo $users[0]-&gt;category; ?&gt;&lt;/option&gt;
      &lt;option value="Human Resource"&gt;Human Resource&lt;/option&gt;
      &lt;option value="Decksys"&gt;Decksys&lt;/option&gt;
      &lt;option value="Pentaho"&gt;Pentaho&lt;/option&gt;
      &lt;option value="Makto"&gt;Makto&lt;/option&gt;
      &lt;option value="Carton"&gt;Carton&lt;/option&gt;
      &lt;/select&gt;
  
  
    &lt;/div&gt;
  
  
    &lt;input type="submit" class="btn btn-primary" value="Submit"&gt;
    &lt;/form&gt;
  </code></pre>
  
  <p>Find below the script which I have used :</p>
  
  <pre><code>   &lt;script type="text/javascript"&gt;
     // just for the demos, avoids form submit
     jQuery.validator.setDefaults({
      debug: true,
      success: "valid"
      });
      $( "#myform" ).validate({
       rules: {
       url: {
         required: true,
            url: true
          }
  
         }
        });
       &lt;/script&gt;
  </code></pre>
  
  <p>Find the controller code below</p>
  
  <pre><code> public function edit(Request $request,$id) {
      $name = $request-&gt;input('name');
      $url = $request-&gt;input('url');
      $category = $request-&gt;input('category');
  
      DB::update('update links set name = ?,url=?,category=? where id = ?',[$name,$url,$category,$id]);
      \Session::flash('message', 'Successfully updated!');
      return redirect()-&gt;route('home');
  
      }
  </code></pre>
  
  <p>Kindly suggest a solution to submit the form along with form validation.</p>