Skip to content

Commit

Permalink
add support for Laravel 5.5 auto discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
coolcodemy committed Aug 26, 2017
1 parent dbe41ab commit 3e1333e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ $ composer require runcloudio/flysystem-b2
## Usage with Laravel


In your app.php config file add to the list of service providers:
If you are using **Laravel 5.4 and below**, add this line to app.php inside list of Service Providers.:
```
\RunCloudIO\FlysystemB2\BackblazeServiceProvider::class,
```

Add the following to your filesystems.php config file in the ```disks``` section:
Starting from Laravel 5.5, they implements **Package Auto Discovery**, so you don't have to add the service provider.

Doesn't matter which Laravel version you are using, add the following to your filesystems.php config file in the ```disks``` section:
```
'b2' => [
'driver' => 'b2',
Expand Down
9 changes: 8 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,12 @@
},
"config": {
"sort-packages": true
}
},
"extra": {
"laravel": {
"providers": [
"RunCloudIO\\FlysystemB2\\BackblazeServiceProvider"
]
}
},
}

0 comments on commit 3e1333e

Please sign in to comment.