diff --git a/composer.json b/composer.json index a6ee508..ab9e452 100644 --- a/composer.json +++ b/composer.json @@ -10,11 +10,11 @@ } ], "require": { - "laravel/framework": "~5.2|^6.0|^7.0" + "laravel/framework": "~5.2|^6.0|^7.0|^8.0" }, "require-dev": { - "orchestra/testbench": "~3.0", - "mockery/mockery": "^1.2" + "orchestra/testbench": "~3.0|~4.0|~5.0|~6.0", + "mockery/mockery": "^1.4" }, "autoload": { "psr-4": { diff --git a/src/SettingsManager.php b/src/SettingsManager.php index 8669f0e..047802d 100644 --- a/src/SettingsManager.php +++ b/src/SettingsManager.php @@ -3,6 +3,7 @@ namespace Laraeast\LaravelSettings; use Illuminate\Support\Manager; +use Illuminate\Support\Facades\Config; class SettingsManager extends Manager { @@ -13,7 +14,7 @@ class SettingsManager extends Manager */ public function createDatabaseDriver() { - return new DatabaseSettingsHandler($this->app); + return new DatabaseSettingsHandler(app()); } /** @@ -23,7 +24,7 @@ public function createDatabaseDriver() */ public function getDefaultDriver() { - return $this->app['config']['laravel-settings.driver']; + return Config::get('laravel-settings.driver'); } /** @@ -35,6 +36,6 @@ public function getDefaultDriver() */ public function setDefaultDriver($name) { - $this->app['config']['laravel-settings.driver'] = $name; + Config::set(['laravel-settings.driver' => $name]); } }