title: datatables warning: table id=laravel datatable -exception message undefined index yajra
body: <p>good morning, 
  I have the following error when inserting data to my datatable.</p>
  
  <p>this is my query from my controller</p>
  
  <pre><code>if(request()-&gt;ajax()) {
  
          $user = auth()-&gt;id();
          $queja = Queja::join("reportes","reportes.id_reporte","=","quejas.id_reporte")-&gt;where('reportes.id','=',$user)-&gt;orderBy('reportes.fecha','asc')-&gt;get();
          return datatables()-&gt;of($queja)
          -&gt;addColumn('action', function($data){
                      $button = '
                          &lt;div class="btn-group text-right"&gt;
                                  &lt;button type="button"   class="btn btn-success br2 btn-xs fs12 dropdown-toggle" data-toggle="dropdown" aria-expanded="false"&gt; OPCIONES
                                      &lt;span class="caret ml5"&gt;&lt;/span&gt;
                                  &lt;/button&gt;
                                  &lt;ul class="dropdown-menu" role="menu"&gt;
                                      &lt;li&gt;
                                          &lt;a id="'.$data-&gt;id_queja.'" href="#"&gt;VISUALIZAR&lt;/a&gt;
                                      &lt;/li&gt;
                                      &lt;li&gt;
                                  &lt;/ul&gt;
                              &lt;/div&gt;';
                      return $button;
                  })
          -&gt;rawColumns(['action'])
          -&gt;addIndexColumn()
          -&gt;make(true);
  
      }  
     return view('personal.listar.listar_quejasPersonal');
  </code></pre>
  
  <p>this is my ajax</p>
  
  <pre><code> $(document).ready( function () {
         $.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            }
        });
        $('#laravel_datatable').DataTable({
               processing: true,
               serverSide: true,
               ajax: {
                url: "{{ route('Quejas.Lista.Personal') }}",
                type: 'GET',
               },
               columns: [
                          { data: 'folio', name: 'reportes.folio', width: '10px' },
                          { data: 'asunto', name: 'reportes.asunto' },
                          { data: 'depto_area', name: 'reportes.depto_area' },
                          { data: 'ubicacion', name: 'reportes.ubicacion' },
                          { data: 'nom_trabajador', name: 'quejas.nom_trabajador' },
                          { data: 'fecha_vencimiento', name: 'quejas.fecha_vencimiento' },
                          { data: 'status_queja', name: 'quejas.status_queja', width: '10px' },
                          {data: 'action', name: 'action', width: '10px' , orderable: false}, 
  
                        ],
              order: [[0, 'desc']]
            });
       /*  When user click add user button */
  
  
         /* When click edit user */
  
  
         });
  </code></pre>
  
  <p>and this is my .blade</p>
  
  <pre><code>&lt;div class="panel-body"&gt;
                      &lt;table class="table admin-form theme-warning tc-checkbox-1 fs13" id="laravel_datatable" width="100%" &gt;
                          &lt;thead&gt;
                              &lt;tr class="bg-light"&gt;
                                  &lt;th class="text-center"&gt;FOLIO&lt;/th&gt;
                                  &lt;th class=""&gt;ASUNTO&lt;/th&gt;
                                  &lt;th class=""&gt;DEPTO/AREA&lt;/th&gt;
                                  &lt;th class=""&gt;NOM. TRABAJADOR&lt;/th&gt;
                                  &lt;th class=""&gt;UBICACION&lt;/th&gt;
                                  &lt;th class=""&gt;FECHA &amp; HORA&lt;/th&gt;
                                  &lt;th class="text-right"&gt;STATUS&lt;/th&gt;
                                  &lt;th class="text-right"&gt;ACCIONES&lt;/th&gt;
                              &lt;/tr&gt;
                          &lt;/thead&gt;
                      &lt;/table&gt;
                  &lt;/div&gt;
  </code></pre>
  
  <p>When I enter a single record, it shows me correctly, but when I have more records, it gives me the following error:
  <a href="https://i.stack.imgur.com/ZdILr.png" rel="nofollow noreferrer">enter image description here</a>
  <a href="https://i.stack.imgur.com/Uai1L.png" rel="nofollow noreferrer">enter image description here</a></p>