title: JQuery Ajax post method is not working in laravel
body: <p>I want to save an image and two text field using JQuery,Ajax. here, i'm using bootstrap modal. But when I submit the modal form it's show <strong>MethodNotAllowedHttpException</strong> Exception. </p>
  
  <p>My Ajax Method.</p>
  
  <pre><code> $(document).ready(function(){
     $('#advisoradd').on('submit',function(){
          var name=$('#adname').val();
          var title=$('#adtitle').val();
          var img=$('#adfile').val();
  
  
         $.ajax({
  
          url:"{{route('add.advisor')}}",
          type:'post',
          data:{
              '_token':"{{csrf_token()}}",
              'name':name,
              'title':title,
              'img':img,
          },
  
          success:function(data)
          {
              console.log(data);
          }
  
         });
  
     });
  
  });
  </code></pre>
  
  <p>My view Modal code.</p>
  
  <pre><code> &lt;form method="POST" enctype="multipart/form-data"&gt;
              {{csrf_field()}}
                                &lt;div class="form-group"&gt;
                                 &lt;div class="img_upload_team"&gt;
                                  &lt;button class="btn"&gt;+&lt;/button&gt;
            &lt;input type="file" name="myfile" id="adfile"&gt;
                                    &lt;/div&gt;
                                      &lt;h2&gt;Add A Profile Photo&lt;/h2&gt;
                                      &lt;p&gt;Click “+” Sign to Add&lt;/p&gt;
                                       &lt;/div&gt;
                                       &lt;div class="form-group"&gt;
            &lt;input type="text" name="adname" class="form-control" id="adname" placeholder="Name"&gt;
                                        &lt;/div&gt;
                                         &lt;div class="form-group"&gt;
             &lt;input type="text" name="adtitle" class="form-control" id="adtitle" placeholder="Title"&gt;
                                          &lt;/div&gt;
  
                      &lt;button type="submit" class="btn btn_modal_submit" id="advisoradd"&gt;Add&lt;/button&gt;
           &lt;/form&gt;
  </code></pre>
  
  <p>My controller and Route for this Request.</p>
  
  <pre><code> public function addadvisor(Request $request)
  {
      $advisor=new Advisor();
      $advisor-&gt;name=$request-&gt;name;
      $advisor-&gt;title=$request-&gt;title;
  
      $file = $request-&gt;file('img') ;
      $fileName = $file-&gt;getClientOriginalName();
      $destinationpath=public_path().'/images/';
      $file-&gt;move($destinationpath,$fileName);
      $advisor-&gt;image=$fileName;
      $advisor-&gt;save();
      return response()-&gt;json($advisor);
  }
  </code></pre>
  
  <p><strong>Route::post('/advisor','ImageController@addadvisor')->name('add.advisor');</strong></p>