title: Problem using Laravel when I add a record
body: <p>Great to know you!
  I have a problem when I use Laravel to make book bus tickets online system :((. I import *.sql by phpMyadmin so I don't create file migrate.</p>
  <p><a href="https://i.stack.imgur.com/8BR81.png" rel="nofollow noreferrer">This is lichtrinh table</a></p>
  <p>Everything is well (1st record and 2nd record my application working well) but until I add 3rd record to table, ajax() alert ('Not submit') Althought I just add new record</p>
  <p>My file js</p>
  <pre><code>$(document).ready(function () {
  $('#btn-submit').click(function (e) {
      e.preventDefault();
      $username = $('#username').val();
      $pass = $('#pass').val();
      $.ajaxSetup({
          headers: {
              'X-CSRF-TOKEN': $('meta[name=&quot;_token&quot;]').attr('content')
          }
      });
      $.ajax({
          url: &quot;/login&quot;,
          type: &quot;POST&quot;,
          data: {
              username: $username,
              pass: $pass
          },
          success: function (data) {
              if (data == '') {
                  window.location = &quot;/ve/banve&quot;
              } else {
                  $('.toast-container').empty();
                  $('.toast-container').append(data);
                  $('.toast').each(function (indexInArray,
                      valueOfElement) {
                      var toast2 = new bootstrap.Toast($(this));
                      toast2.show();
                  });
  
              }
  
          },
          error: function () {
              alert(&quot;Not submit&quot;)
          },
  
      });
  });
  </code></pre>
  <p>});</p>
  <p>My controller</p>
  <pre><code>public function findLichTrinh(Request $request)
  {
      $lichtrinhs = LichTrinh::where('id_tuyen', $request-&gt;id_tuyen)-&gt;where('ngaydi', $request-&gt;ngaydi)-&gt;get();
      $output = &quot;&quot;;
      if (!empty($lichtrinhs)) {
          foreach ($lichtrinhs as $lichtrinh) {
              $output .= '&lt;div class=&quot;main-item-roundbus m-2 able-cursor&quot;&gt;
                              &lt;div class=&quot;main-item-title d-inline-flex justify-content-around align-items-center&quot;&gt;
                                  &lt;span class=&quot;text-white&quot;&gt;' . $lichtrinh-&gt;giodi . '&lt;/span&gt;
                                  &lt;span class=&quot;text-white border border-3 p-1&quot; style=&quot;border-radius: 5px;&quot;&gt;' . $lichtrinh-&gt;xes-&gt;bienso . '&lt;/span&gt;
                              &lt;/div&gt;
                              &lt;div class=&quot;px-2&quot;&gt;
                                  &lt;span style=&quot;font-size: 17px;&quot; class=&quot;fw-bold text-danger text-center&quot;&gt;' . $lichtrinh-&gt;tuyens-&gt;name_tuyen . '&lt;/span&gt;
                                  &lt;br&gt;
                                  &lt;span style=&quot;font-size: 17px;&quot;&gt;Ghế trống: 10&lt;/span&gt;&lt;br&gt;
                                  &lt;span style=&quot;font-size: 17px;&quot;&gt;Gía: 100 000 VNĐ&lt;/span&gt;&lt;br&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;';
          }
      } else {
          $output = '&lt;h1&gt;Not Found&lt;/h1&gt;';
      }
      return $output;
  }
  </code></pre>
  <p>My route</p>
  <pre><code>Route::get('/ve/banve/lichtrinh', 'App\Http\Controllers\VeController@findLichTrinh');
  </code></pre>
  <p>Thank you very much! Please help me. I'm so sorry, I know my English is not well</p>