-
-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e7df086
commit 38aed2f
Showing
4 changed files
with
12 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,7 +148,7 @@ $rows = SimpleExcelReader::create($pathToCsv) | |
|
||
#### Manually formatting headers | ||
|
||
You can use a custom formatter to change the headers using the ```formatHeaderUsing``` method and passing a closure. | ||
You can use a custom formatter to change the headers using the `formatHeadersUsing` method and passing a closure. | ||
|
||
```csv | ||
email,first_name,last_name | ||
|
@@ -158,7 +158,7 @@ [email protected],mary jane,doe | |
|
||
```php | ||
$rows = SimpleExcelReader::create($pathToCsv) | ||
->formatHeaderUsing(fn($header) => "{$header}_simple_excel") | ||
->formatHeadersUsing(fn($header) => "{$header}_simple_excel") | ||
->getRows() | ||
->each(function(array $rowProperties) { | ||
// ['email_simple_excel' => 'john@example', 'first_name_simple_excel' => 'John', 'last_name_simple_excel' => 'doe'] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters