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 - Basic Demo with Object Data Source

Since v6.0, you can now optionally set value to null. The package will automatically use value as column name when filtering and sorting records.

NOTE: This is only applicable if your column name is the same with the data to display. If not, you need to specify on your script.
Id Name Email Created At Updated At


    public function getBasicObject()
        return view('datatables.eloquent.basic-object');

    public function getBasicObjectData()
        return Datatables::of(User::query())->make(true);


        processing: true,
        serverSide: true,
        ajax: '',
        columns: [
            {data: 'id'},
            {data: 'name'},
            {data: 'email'},
            {data: 'created_at'},
            {data: 'updated_at'}