Skip to content

Commit

Permalink
Laravel 6 (#8)
Browse files Browse the repository at this point in the history
laravel 6 support
  • Loading branch information
saqueib authored Sep 5, 2019
1 parent 34737d5 commit d71ff19
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: php

php:
- 7.1
- 7.2

before_script:
- travis_retry composer self-update
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

All notable changes to `qcod/laravel-settings` will be documented in this file

## 1.0.7 - 2019-09-05
- Laravel 6 support

## 1.0.6 - 2019-08-01

- Organize settings into groups support

## 1.0.5 - 2018-03-13

- added support for publishing migration folder

## 1.0.4 - 2018-12-20

- added support for publishing migration folder

## 1.0.3 - 2018-12-20

- added migration publishing support

## 1.0.2 - 2018-10-10

- Changed helper function and facade name, made them plural
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
}
],
"require": {
"php": ">=5.6.0",
"laravel/framework": "~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0"
"php": "^7.2",
"laravel/framework": "~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0"
},
"require-dev": {
"orchestra/testbench": "~3.4",
"orchestra/testbench": "~3.4|^4.0",
"mockery/mockery": "^0.9.4 || ~1.0",
"phpunit/phpunit": "~7.0"
"phpunit/phpunit": "^8.0"
},
"autoload": {
"classmap": [
Expand Down
8 changes: 5 additions & 3 deletions src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@
*/
function settings($key = null, $default = null)
{
$setting = app()->make('QCod\Settings\Setting\SettingStorage');

if (is_null($key)) {
return app()->make('QCod\Settings\Setting\SettingStorage');
return $setting;
}

if (is_array($key)) {
return app()->make('QCod\Settings\Setting\SettingStorage')->set($key);
return $setting->set($key);
}

return app()->make('QCod\Settings\Setting\SettingStorage')->get($key, value($default));
return $setting->get($key, value($default));
}
}

0 comments on commit d71ff19

Please sign in to comment.