title: Add delete button in Data table with Laravel
body: <p>I' trying to add delete button in Data table column but it doesn't work. but my edit button works perfect. here i have post my <strong>Qus</strong><a href="https://github.com/yajra/laravel-datatables/issues/88" rel="nofollow">LINK</a>
   edit button works perfect but delet button only errors</p>
  
  <pre><code>public function getRowDetailsData(PslCall $call)
      {
          $crews = Crew::Where('call_id',$call-&gt;id)-&gt;get();
          return Datatables::of($crews)
              -&gt;addColumn('action', function ($crew) {
                  return '&lt;a href="crews/'.$crew-&gt;id.'/edit" class="btn btn-xs"&gt;&lt;span class="glyphicon glyphicon-edit" data-toggle="tooltip" title="Edit"aria-hidden="true"&gt;&lt;/span&gt;&lt;/a&gt;
                  &lt;form action="{{ route(\'crews.destroy\', $crew-&gt;id)}}" method="POST"&gt;&lt;input type="hidden" name="_method" value="DELETE"&gt;
                  &lt;button type="submit" class="btn-xs  form-btn confirmation-callback" data-placement="left"&gt;&lt;span class="glyphicon glyphicon-trash" aria-hidden="true"&gt;&lt;/span&gt;&lt;/button&gt;
                  &lt;/form&gt;';
              })
              -&gt;editColumn('id', 'ID: {{$id}}')
              -&gt;removeColumn('id')
              -&gt;editColumn('arrival_date', function ($crew) {
                  return $crew-&gt;arrival_date ? with(new Carbon($crew-&gt;arrival_date))-&gt;format('d-M-Y h:i') : '';
              })
              -&gt;filterColumn('arrival_date', function ($query, $keyword) {
                  $query-&gt;whereRaw("DATE_FORMAT(created_at,'%m/%d/%Y') like ?", ["%$keyword%"]);
              })-&gt;make(true);
      }
  </code></pre>
  
  <p>My Table like this </p>
  
  <pre><code>&lt;table class="table table-striped table-bordered table-hover datas" cellspacing="0" width="100%"&gt;
                                      &lt;thead&gt;
                                      &lt;tr&gt;
                                          &lt;th&gt;&lt;/th&gt;
                                          &lt;th&gt;NAME&lt;/th&gt;
                                          &lt;th&gt;GENDER&lt;/th&gt;
                                          &lt;th&gt;TYPE&lt;/th&gt;
                                          &lt;th&gt;ARRIVAL /DEPARTURE&lt;/th&gt;
                                          &lt;th&gt;ACTION&lt;/th&gt;
                                      &lt;/tr&gt;
                                      &lt;/thead&gt;
                                  &lt;/table&gt;
  </code></pre>
  
  <p>again my script like this </p>
  
  <pre><code>var table = $('.datas').DataTable({
          processing: true,
          serverSide: true,
          ajax: '{{ url('calls/'.$call-&gt;id.'/row-details-data') }}',
  
          columns: [
              {
                  "className":      'details-control',
                  "orderable":      false,
                  "searchable":     false,
                  "data":           null,
                  "defaultContent": '&lt;span class="btn  btn-xs glyphicon glyphicon-download"&gt;&lt;/span&gt;'
              },
              {data: 'crew_name', name: 'crew_name'},
              {data: 'gender', name: 'gender'},
              {data: 'crew_type'},
              {data: 'arrival_date', "render":function(data, type, row){
                  switch(row.crew_type) {
                      case 'ONSIGNER' : return 'Arrival : '+ row.arrival_date; break;
                      case 'OFFSIGNER' : return 'Depart : '+ row.arrival_date; break;
                      default  : return 'N/A';
                  }
  
              }},
              {data: 'action', name: 'action', orderable: false, searchable: false}
          ],
  
      } );
  </code></pre>