Html Builder Table
Table api accepts two parameters: $builder->table(array $attributes, $footer = false)
- $attributesrepresents an array that will be converted as your- <table></table>attributes.
- $footerwill include/remove- <tfoot></tfoot>on your- tablemarkup.
Table Example with Footer
use Illuminate\Support\Facades\Route;use Yajra\DataTables\Facades\DataTables;use Yajra\DataTables\Html\Builder; Route::get('users', function(Builder $builder) {    if (request()->ajax()) {        return DataTables::of(User::query())->toJson();    }     $html = $builder->columns([                ['data' => 'id', 'footer' => 'Id'],                ['data' => 'name', 'footer' => 'Name'],                ['data' => 'email', 'footer' => 'Email'],                ['data' => 'created_at', 'footer' => 'Created At'],                ['data' => 'updated_at', 'footer' => 'Updated At'],            ]);     return view('users.index', compact('html'));});On your resources/views/users/index.blade.php.
@extends('app') @section('contents')    {!! $html->table(['class' => 'table table-bordered'], true) !!}@endsection @push('scripts')    {!! $html->scripts() !!}@endpush