Skip to content

Commit dcadc84

Browse files
committed
- Update readme
1 parent b80c220 commit dcadc84

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ composer require rappasoft/laravel-livewire-tables
2424

2525
To create a table component you can start with the below stub:
2626

27-
```
27+
```php
2828
<?php
2929

3030
namespace App\Http\Livewire;
@@ -70,7 +70,7 @@ class UsersTable extends TableComponent
7070

7171
Your component must implement two methods:
7272

73-
```
73+
```php
7474
/**
7575
* This defines the start of the query, usually Model::query() but can also eagar load relationships and counts.
7676
*/
@@ -100,15 +100,15 @@ Obviously replace *users-table* with your component name.
100100

101101
You can define the columns of your table with the column class:
102102

103-
```
103+
```php
104104
Column::make('Name', 'column_name')
105105
```
106106

107107
The first parameter is the name of the table header. The second parameter is the name of the table column. You can leave blank and the lowercase snake_case version will be used by default.
108108

109109
Here are a list of the column method you can chain to build your columns:
110110

111-
```
111+
```php
112112
/**
113113
* This column is searchable, with no callback it will search the column by name or by the supplied relationship, using a callback overrides the default searching functionality.
114114
*/
@@ -215,7 +215,7 @@ You can override any of these in your table component:
215215

216216
### Table Methods
217217

218-
```
218+
```php
219219
/**
220220
* Used to set a class on a table header based on the column attribute
221221
*/

0 commit comments

Comments
 (0)