Skip to content

Commit 8650801

Browse files
committed
Merge branch 'develop'
2 parents d9a57e0 + 6295e28 commit 8650801

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 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
*/
@@ -82,7 +82,7 @@ public function query() : Builder;
8282
public function columns() : array;
8383
```
8484

85-
### Rendering the table
85+
### Rendering the Table
8686

8787
Place the following where you want the table to appear.
8888

@@ -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)