Open mortenscheel opened 1 week ago
You can use the Layout Builder class:
use Yajra\DataTables\Html\Layout;
...
->layout(fn (Layout $layout) => $layout->topStart('pageLength')->bottom(['info', null, 'paging']))
Thanks. Doesn't work for me. The Layout feature was introduced in DataTable 2.0, and your installation guide lists v1.10.x as a requirement.
Yes, you need to use DataTable v2 if you want to use layout. And don't mix up dom with layout because it causes issues when used simultaneously like I remember when I upgraded from v1 to v2.
Summary of problem or feature request
The old
->dom()
method is deprecated, and replaced by->layout()
, but it's unclear how it should be used. The various builder methods on Layout accept an$options
argument, but what it's supposed to contain isn't clear.System details