Skip to content

Commit 448475b

Browse files
committed
Merge branch 'tonypartridge-patch-1' into develop
2 parents a3d7804 + d236242 commit 448475b

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,24 @@ use Rappasoft\LaravelLivewireTables\Views\Column;
4141

4242
class UsersTable extends DataTableComponent
4343
{
44-
4544
protected $model = User::class;
4645

46+
public function configure(): void
47+
{
48+
$this->setPrimaryKey('id');
49+
}
50+
4751
public function columns(): array
4852
{
4953
return [
54+
Column::make('ID', 'id')
55+
->sortable(),
5056
Column::make('Name')
51-
->sortable()
52-
->searchable(),
53-
Column::make('E-mail', 'email')
54-
->sortable()
55-
->searchable(),
56-
Column::make('Verified', 'email_verified_at')
5757
->sortable(),
5858
];
5959
}
6060
}
61+
6162
```
6263

6364
### [See advanced example](https://rappasoft.com/docs/laravel-livewire-tables/v2/examples/advanced-example)

0 commit comments

Comments
 (0)