Donations Appreciated

The simplest acts of kindness are by far more powerful then a thousand heads bowing in prayer. - Mahatma Gandhi

Click here to lend your support to: Laravel Datatables and make a donation at !

EloquentController.php - Search using Post Method

Id Name Email Created At Updated At
Id Name Email Created At Updated At


    public function getPostColumnSearch()
        return view('');

    public function anyColumnSearchData(Request $request)
        $users = User::select([
            DB::raw("CONCAT(,'-', as user_id"),

        return Datatables::of($users)
            ->filterColumn('user_id', function($query, $keyword) {
                $query->whereRaw("CONCAT(,'-', like ?", ["%{$keyword}%"]);


        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')

        processing: true,
        serverSide: true,
        ajax: {
            url: '',
            method: 'POST'
        columns: [
            {data: 'user_id', name: 'user_id'},
            {data: 'name', name: 'name'},
            {data: 'email', name: 'email'},
            {data: 'created_at', name: 'created_at'},
            {data: 'updated_at', name: 'updated_at'}
        initComplete: function () {
            this.api().columns().every(function () {
                var column = this;
                var input = document.createElement("input");
                .on('change', function () {