also looking at this
[WIP] Implementing full feature
#1
4 files
+15
-53
| @@ -3,6 +3,9 @@ | ||
| 3 | 3 | namespace Meema\LaravelMeema; |
| 4 | 4 | |
| 5 | 5 | use Illuminate\Support\ServiceProvider; |
| 6 | use League\Flysystem\Filesystem; | |
| 7 | use Meema\FlysystemMeema\MeemaAdapter; | |
| 8 | use Storage; | |
| 6 | 9 | |
| 7 | 10 | class MeemaServiceProvider extends ServiceProvider |
| 8 | 11 | { |
| @@ -11,11 +14,9 @@ class MeemaServiceProvider extends ServiceProvider | ||
| 11 | 14 | */ |
| 12 | 15 | public function boot() |
| 13 | 16 | { |
| 14 | if ($this->app->runningInConsole()) { | |
| 15 | $this->publishes([ | |
| 16 | __DIR__.'/../config/config.php' => config_path('meema.php'), | |
| 17 | ], 'config'); | |
| 18 | } | |
| 17 | Storage::extend('meema', function ($app, $config) { | |
| 18 | return new Filesystem(new MeemaAdapter($config)); | |
| 19 | }); | |
| 19 | 20 | } |
| 20 | 21 | |
| 21 | 22 | /** |
| @@ -23,6 +24,6 @@ class MeemaServiceProvider extends ServiceProvider | ||
| 23 | 24 | */ |
| 24 | 25 | public function register() |
| 25 | 26 | { |
| 26 | $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'meema'); | |
| 27 | // | |
| 27 | 28 | } |
| 28 | 29 | } |