Skip to content

Commit

Permalink
Merge pull request #2 from matriphe/add-package-auto-discovery
Browse files Browse the repository at this point in the history
Add package auto discovery feature support for Laravel 5.5
  • Loading branch information
SimoTod authored Aug 31, 2018
2 parents 2d42306 + c059429 commit 7939f48
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,29 @@ Use composer to download the package:
composer require cyber-duck/laravel-excel
```

Register the service provider in `config/app.php` adding *Cyberduck\LaravelExcel\ExcelServiceProvider* to the provider array.
### Laravel 4.x

Note. If you are on Laravel 4, use *Cyberduck\LaravelExcel\ExcelLegacyServiceProvider*
Register the service provider in `config/app.php` by adding this line to providers array.

```php
'providers' => [
Cyberduck\LaravelExcel\ExcelLegacyServiceProvider::class,
],
```

### Laravel < 5.5

Register the service provider in `config/app.php` by adding this line to providers array.

```php
'providers' => [
Cyberduck\LaravelExcel\ExcelServiceProvider::class,
],
```

### Laravel 5.5

No need to register anything, since it used package auto discovery feature in Laravel 5.5.

## Export Excel

Expand Down
7 changes: 7 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,12 @@
"tests/utils/FirstColumnOnlySerialiser.php"
]
},
"extra": {
"laravel": {
"providers": [
"Cyberduck\\LaravelExcel\\ExcelServiceProvider"
]
}
},
"minimum-stability": "stable"
}

0 comments on commit 7939f48

Please sign in to comment.