Skip to content

Commit

Permalink
add support for laravel 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed-aliraqi committed Sep 9, 2020
1 parent 62f23ff commit f19bb43
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
7 changes: 4 additions & 3 deletions src/SettingsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Laraeast\LaravelSettings;

use Illuminate\Support\Manager;
use Illuminate\Support\Facades\Config;

class SettingsManager extends Manager
{
Expand All @@ -13,7 +14,7 @@ class SettingsManager extends Manager
*/
public function createDatabaseDriver()
{
return new DatabaseSettingsHandler($this->app);
return new DatabaseSettingsHandler(app());
}

/**
Expand All @@ -23,7 +24,7 @@ public function createDatabaseDriver()
*/
public function getDefaultDriver()
{
return $this->app['config']['laravel-settings.driver'];
return Config::get('laravel-settings.driver');
}

/**
Expand All @@ -35,6 +36,6 @@ public function getDefaultDriver()
*/
public function setDefaultDriver($name)
{
$this->app['config']['laravel-settings.driver'] = $name;
Config::set(['laravel-settings.driver' => $name]);
}
}

0 comments on commit f19bb43

Please sign in to comment.