PHP Laravel列搜索无法通过-> editcolumn getdatatable有效地工作

搜索列脚本

<script>
    $.fn.dataTable.ext.errMode = 'none';
    var tableObj;

    $(document).ready(function(){
        // debugger;
        $.ajaxSetup({
        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            }
        });

         tableObj = $('{{ $class_name }}').DataTable({

                searchable: true,
                processing: true,
                serverSide: true,
                 "aaSorting": [],
                cache: true,
                type: 'GET',
                ajax: '{{ $routeValue }}',
                @if(isset($table_columns))
                columns: {!!$setData!!}
                @endif
                initComplete: function () {
                    this.api().columns().every(function () {
                        var column = this;
                        var input = document.createElement("input");
                        $(input).appendTo($(column.header()))
                        .on('keyup', function () {

                            column.search($(this).val(), false, false, true).draw();
                        });

                    });
                }


        });

          $('.datatable').find('select.form-control').removeClass('form-control input-sm').addClass('full-width').attr('data-init-plugin','select2');        
    });
    // console.log("it is working");
  </script>

控制器功能获取数据

 $records = array();
   dd($record);
             $records = User::join('roles', 'users.role_id', '=', 'roles.id')

            ->select(['users.id','users.name', 'phone','users.default_bill_address','area','users.created_at','website','user_status','reason_inactive','is_online','login_enabled','role_id',

              'slug'])->orderBy('users.created_at', 'desc');

             if(!isset($_GET['order'])){
              $records = $records ->whereIn('users.id',$list_his)->orderBy('users.created_at', 'desc');
           }
        return Datatables::of($records)
       ->editColumn ('default_bill_address', function($records){
          if($records->default_bill_address)
          {
            $add = Address::where('id',$records->default_bill_address)->first();
            if($add)
            return $add->fullAddress();
            else
            return '-';

         }
         else
          return '-';
        })

screenshot screenshot related to panel where search column is present.

描述

我已经从不同的表格中以相同的方式编辑了许多列,       当我在特定列中搜索时,它什么也没有给我,       bcz相关文本不在查询表中,并且       我无法加入太多表格以在搜索时获得结果。