Skip to content

Commit

Permalink
Enable package discovery (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stéphane Coinon authored and Webklex committed Apr 7, 2018
1 parent 8d112c7 commit f8d99ef
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,20 @@ You might also want to check `phpinfo()` if the extension is enabled.
composer require webklex/laravel-imap
```

3) Open your `config/app.php` file and add the following to the `providers` array:
3) If you're running Laravel >= 5.5, package discovery will configure the service provider and `Client` alias out of the box.

``` php
Webklex\IMAP\Providers\LaravelServiceProvider::class,
```

4) In the same `config/app.php` file add the following to the `aliases ` array:
Otherwise, for Laravel <= 5.4, edit your `config/app.php` file and:

``` php
'Client' => Webklex\IMAP\Facades\Client::class,
```
- add the following to the `providers` array:
``` php
Webklex\IMAP\Providers\LaravelServiceProvider::class,
```
- add the following to the `aliases` array:
``` php
'Client' => Webklex\IMAP\Facades\Client::class,
```

5) Run the command below to publish the package config file [config/imap.php](src/config/imap.php):
4) Run the command below to publish the package config file [config/imap.php](src/config/imap.php):

``` shell
php artisan vendor:publish --provider="Webklex\IMAP\Providers\LaravelServiceProvider"
Expand Down
8 changes: 8 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
},
"laravel": {
"providers": [
"Webklex\\IMAP\\Providers\\LaravelServiceProvider"
],
"aliases": {
"Client": "Webklex\\IMAP\\Facades\\Client"
}
}
},
"minimum-stability": "dev",
Expand Down

0 comments on commit f8d99ef

Please sign in to comment.