Eloquent DataTable with Array Response

Id Name Email Created At Updated At Action

HTML

<table id="users-table" class="table table-bordered">
    <thead>
    <tr>
        <th>Id</th>
        <th>Name</th>
        <th>Email</th>
        <th>Created At</th>
        <th>Updated At</th>
        <th>Action</th>
    </tr>
    </thead>
</table>

Routes

<?php

Route::get('eloquent/array', 'Eloquent\ArrayResponseController@index');
Route::get('eloquent/array-data', 'Eloquent\ArrayResponseController@data');

Controller

<?php

namespace App\Http\Controllers\Eloquent;

use App\Http\Controllers\Controller;
use App\User;
use Yajra\Datatables\Datatables;

class ArrayResponseController extends Controller
{
    /**
     * Display index page.
     *
     * @return \BladeView|bool|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function index()
    {
        return view('eloquent.array');
    }

    /**
     * Process dataTable ajax response.
     *
     * @param \Yajra\Datatables\Datatables $datatables
     * @return \Illuminate\Http\JsonResponse
     */
    public function data(Datatables $datatables)
    {
        return $datatables->eloquent(User::select('id', 'name', 'email', 'created_at', 'updated_at'))
                          ->addColumn('action', 'eloquent.tables.users-action')
                          ->rawColumns([5])
                          ->make();
    }
}

JS