composer.jsonmodified+8-1Changes to composer.json | @@ -18,7 +18,8 @@ |
| 18 | 18 | } |
| 19 | 19 | ], |
| 20 | 20 | "require": { |
| 21 | | - "php": "^7.3" |
| 21 | + "php": "^7.3", |
| 22 | + "meema/flysystem-meema": "dev-master" |
| 22 | 23 | }, |
| 23 | 24 | "require-dev": { |
| 24 | 25 | "symfony/var-dumper": "^4.3", |
| @@ -38,6 +39,12 @@ |
| 38 | 39 | "test": "vendor/bin/phpunit", |
| 39 | 40 | "test-coverage": "vendor/bin/phpunit --coverage-html coverage" |
| 40 | 41 | }, |
| 42 | + "repositories": [ |
| 43 | + { |
| 44 | + "type": "path", |
| 45 | + "url": "../flysystem-meema" |
| 46 | + } |
| 47 | + ], |
| 41 | 48 | "config": { |
| 42 | 49 | "sort-packages": true |
| 43 | 50 | }, |
src/MeemaClass.phpdeleted+0-25
Changes to src/MeemaClass.php | @@ -1,25 +0,0 @@ |
| 1 | | -<?php |
| 2 | | - |
| 3 | | -namespace Meema\LaravelMeema; |
| 4 | | - |
| 5 | | -class MeemaClass |
| 6 | | -{ |
| 7 | | - |
| 8 | | - |
| 9 | | - |
| 10 | | - public function __construct() |
| 11 | | - { |
| 12 | | - |
| 13 | | - } |
| 14 | | - |
| 15 | | - |
| 16 | | - |
| 17 | | - |
| 18 | | - |
| 19 | | - |
| 20 | | - |
| 21 | | - public function echoPhrase($phrase) |
| 22 | | - { |
| 23 | | - return $phrase; |
| 24 | | - } |
| 25 | | -} |
src/MeemaFacade.phpdeleted+0-21
Changes to src/MeemaFacade.php | @@ -1,21 +0,0 @@ |
| 1 | | -<?php |
| 2 | | - |
| 3 | | -namespace Meema\LaravelMeema; |
| 4 | | - |
| 5 | | -use Illuminate\Support\Facades\Facade; |
| 6 | | - |
| 7 | | - |
| 8 | | - |
| 9 | | - |
| 10 | | -class MeemaFacade extends Facade |
| 11 | | -{ |
| 12 | | - |
| 13 | | - |
| 14 | | - |
| 15 | | - |
| 16 | | - |
| 17 | | - protected static function getFacadeAccessor() |
| 18 | | - { |
| 19 | | - return 'meema'; |
| 20 | | - } |
| 21 | | -} |
src/MeemaServiceProvider.phpmodified+7-6Changes to src/MeemaServiceProvider.php | @@ -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 | } |