Skip to content

Commit 03d2386

Browse files
committed
upd readme
1 parent fdd54a7 commit 03d2386

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,23 @@ composer require avadim/fast-excel-laravel
3030
And then you can use facade ```Excel```
3131

3232
```php
33-
// Create workbook
33+
// Create workbook...
3434
$excel = \Excel::create();
35-
// do something...
35+
36+
// export model...
37+
$sheet->->withHeadings()->exportModel(Users::class);
38+
3639
// and save XLSX-file to default storage
3740
$excel->saveTo('path/file.xlsx');
3841

3942
// or save file to specified disk
4043
$excel->store('disk', 'path/file.xlsx');
44+
45+
// Open saved workbook
46+
$excel = \Excel::open(storage_path('path/file.xlsx'));
47+
48+
// import records to database
49+
$excel->importModel(User::class);
4150
```
4251

4352
Jump To:

0 commit comments

Comments
 (0)