1. Go to this page and download the library: Download tiknil/wire-table library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tiknil / wire-table example snippets
class UsersTable extends WireTable
{
public function query(): Builder
{
return User::query();
}
public function columns(): array
{
return [
Column::create(
label: __('backend.created_at'),
key: 'created_at',
sort: true
),
Column::create(
label: __('backend.name'),
key: 'name',
sort: true
),
Column::create(
label: __('backend.email'),
key: 'email',
sort: true
),
];
}
}