title: laravel , ajax not working in production mode The requested URL /appointment/45/edit was not found on this server
body: <p>I try to update data using ajax and laravel it working in local but in production, it's given me an error    (The requested URL /appointment/45/edit was not found on this server) </p>
  
  <p>I am using ajax, laravel 5.7</p>
  
  <pre><code>    $(document).on('click', '.edit', function() {
          id = $(this).attr('id');
          $.ajax({
               url: "/appointment/" + id + "/edit",
              dataType: "json",
              success: function(html) {
                  $('#name').val(html.data.name);
                  $('#appdate').val(html.data.appdate);
                  $('.modal-title').text("Edit Appointment");
                  $('#action_button').val("Edit");
                  $('#action').val("Edit");
                  $('#modal-default').modal('show');
              }
          })
      });
  
  
  
  route
  Route::resource('appointment','AppointmentController');
  
  
  
  controller
      public function edit($id)
      {
          if(request()-&gt;ajax())
          {
              $data = Appointment::findOrFail($id);
              return response()-&gt;json(['data' =&gt; $data]);
          }
      }
  </code></pre>
  
  <p>The requested URL /appointment/45/edit was not found on this server</p>
  
  <p>I try to update data using ajax and laravel it working in local but in production, it's giving me an error    (The requested URL /appointment/45/edit was not found on this server) </p>