Skip to content

Commit 3e1333e

Browse files
committed
add support for Laravel 5.5 auto discovery
1 parent dbe41ab commit 3e1333e

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ $ composer require runcloudio/flysystem-b2
1717
## Usage with Laravel
1818

1919

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

25-
Add the following to your filesystems.php config file in the ```disks``` section:
25+
Starting from Laravel 5.5, they implements **Package Auto Discovery**, so you don't have to add the service provider.
26+
27+
Doesn't matter which Laravel version you are using, add the following to your filesystems.php config file in the ```disks``` section:
2628
```
2729
'b2' => [
2830
'driver' => 'b2',

composer.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,12 @@
4545
},
4646
"config": {
4747
"sort-packages": true
48-
}
48+
},
49+
"extra": {
50+
"laravel": {
51+
"providers": [
52+
"RunCloudIO\\FlysystemB2\\BackblazeServiceProvider"
53+
]
54+
}
55+
},
4956
}

0 commit comments

Comments
 (0)