use DataTables;
Route::get('user-data', function() {
$model = AppUser::query();
return DataTables::eloquent($model)
->editColumn('name', function(User $user) {
return 'Hi ' . $user->name . '!';
})
->toJson();
});