-
-
Notifications
You must be signed in to change notification settings - Fork 854
Closed
Description
Summary of problem or feature request
Declaration of Yajra\DataTables\Html\Column::data() method signature incompatibility with Laravel 11. The error occurs when using Column class in DataTables with Laravel 11 and Yajra DataTables 11.0.

Declaration of Yajra\DataTables\Html\Column::data(array|string $value): static must be compatible with Illuminate\Support\Fluent::data($key = null, $default = null)
Code snippet of problem
<?php
namespace App\DataTables\MasterData;
use App\Models\Master\MasterTahunSk;
use Illuminate\Database\Eloquent\Builder as QueryBuilder;
use Yajra\DataTables\EloquentDataTable;
use Yajra\DataTables\Html\Builder as HtmlBuilder;
use Yajra\DataTables\Html\Column;
use Yajra\DataTables\Services\DataTable;
class MasterTahunSkDataTable extends DataTable
{
public function getColumns(): array
{
return [
Column::make('DT_RowIndex')
->title('No')
->orderable(false)
->searchable(false)
->width(60)
->addClass('text-center'),
Column::make('tahun'),
Column::make('keterangan'),
Column::make('biaya_daftar_ulang'),
Column::computed('action')
->exportable(false)
->printable(false),
];
}
}System details
- Operating System: Windows 11
- PHP Version: 8.2
- Laravel Version: 11.36.1
- Laravel-Datatables Version: 11
Metadata
Metadata
Assignees
Labels
No labels