Skip to content

Commit

Permalink
upd readme
Browse files Browse the repository at this point in the history
  • Loading branch information
aVadim483 committed Jul 1, 2023
1 parent fdd54a7 commit 03d2386
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,23 @@ composer require avadim/fast-excel-laravel
And then you can use facade ```Excel```

```php
// Create workbook
// Create workbook...
$excel = \Excel::create();
// do something...

// export model...
$sheet->->withHeadings()->exportModel(Users::class);

// and save XLSX-file to default storage
$excel->saveTo('path/file.xlsx');

// or save file to specified disk
$excel->store('disk', 'path/file.xlsx');

// Open saved workbook
$excel = \Excel::open(storage_path('path/file.xlsx'));

// import records to database
$excel->importModel(User::class);
```

Jump To:
Expand Down

0 comments on commit 03d2386

Please sign in to comment.