Skip to content

Commit bb965cc

Browse files
committed
Use php instead of phpt
1 parent 6fa03ec commit bb965cc

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ php artisan migrate
4848

4949
1. Add the export-button livewire component on your view file that uses dataTable class.
5050

51-
```phpt
51+
```php
5252
<livewire:export-button :table-id="$dataTable->getTableId()" />
5353
```
5454

5555
2. On your `DataTable` class, use `WithExportQueue`
5656

57-
```phpt
57+
```php
5858
use Yajra\DataTables\WithExportQueue;
5959

6060
class PermissionsDataTable extends DataTable
@@ -71,15 +71,15 @@ class PermissionsDataTable extends DataTable
7171

7272
On `app\Console\Kernel.php`, register the purge command
7373

74-
```phpt
74+
```php
7575
$schedule->command('datatables:purge-export')->weekly();
7676
```
7777

7878
## Export Filename
7979

8080
You can set the export filename by setting the property.
8181

82-
```phpt
82+
```php
8383
<livewire:export-button :table-id="$dataTable->getTableId()" filename="my-table.xlsx" />
8484
<livewire:export-button :table-id="$dataTable->getTableId()" filename="my-table.csv" />
8585

@@ -90,7 +90,7 @@ You can set the export filename by setting the property.
9090

9191
You can set the export type by setting the property to `csv` or `xlsx`. Default value is `xlsx`.
9292

93-
```phpt
93+
```php
9494
<livewire:export-button :table-id="$dataTable->getTableId()" type="xlsx" />
9595
<livewire:export-button :table-id="$dataTable->getTableId()" type="csv" />
9696
```
@@ -99,7 +99,7 @@ You can set the export type by setting the property to `csv` or `xlsx`. Default
9999

100100
You can format the column by setting it via Column definition on you DataTable service class.
101101

102-
```phpt
102+
```php
103103
Column::make('mobile')->exportFormat('00000000000'),
104104
```
105105

@@ -109,7 +109,7 @@ The format above will treat mobile numbers as text with leading zeroes.
109109

110110
The package will auto-detect numeric fields and can be used with custom formats.
111111

112-
```phpt
112+
```php
113113
Column::make('total')->exportFormat('0.00'),
114114
Column::make('count')->exportFormat('#,##0'),
115115
Column::make('average')->exportFormat('#,##0.00),
@@ -119,7 +119,7 @@ Column::make('average')->exportFormat('#,##0.00),
119119

120120
The package will auto-detect date fields when used with a valid format or is a DateTime instance.
121121

122-
```phpt
122+
```php
123123
Column::make('report_date')->exportFormat('mm/dd/yyyy'),
124124
Column::make('created_at'),
125125
Column::make('updated_at')->exportFormat(NumberFormat::FORMAT_DATE_DATETIME),
@@ -129,7 +129,7 @@ Column::make('updated_at')->exportFormat(NumberFormat::FORMAT_DATE_DATETIME),
129129

130130
Valid date formats can be adjusted on `datatables-export.php` config file.
131131

132-
```phpt
132+
```php
133133
'date_formats' => [
134134
'mm/dd/yyyy',
135135
NumberFormat::FORMAT_DATE_DATETIME,

0 commit comments

Comments
 (0)