Skip to content

Commit

Permalink
Added support for Laravel 6.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bradley Cornford committed Mar 4, 2020
1 parent f8e5e13 commit f9d5929
Show file tree
Hide file tree
Showing 7 changed files with 226 additions and 212 deletions.
7 changes: 3 additions & 4 deletions .travis.yml
@@ -1,10 +1,9 @@
language: php

php:
- 5.4
- 5.5
- 5.6
- hhvm
- 7.2
- 7.3
- 7.4

before_script:
- composer self-update
Expand Down
14 changes: 8 additions & 6 deletions README.md
Expand Up @@ -5,7 +5,9 @@
[![Build Status](https://travis-ci.org/bradcornford/Setter.svg?branch=master)](https://travis-ci.org/bradcornford/Setter)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/bradcornford/Setter/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/bradcornford/Setter/?branch=master)

### For Laravel 4.x, check [version 1.5.5](https://github.com/bradcornford/Setter/tree/v1.5.5)
### For Laravel 5.x, check [version 2.4.0](https://github.com/bradcornford/Setter/tree/v1.5.5)

### For Laravel 4.x, check [version 1.7.2](https://github.com/bradcornford/Setter/tree/v1.5.5)

Think of Setter as an easy way to integrate Settings with Laravel, providing a variety of helpers to speed up the utilisation of application wide settings. These include:

Expand All @@ -22,7 +24,7 @@ Think of Setter as an easy way to integrate Settings with Laravel, providing a v
Begin by installing this package through Composer. Edit your project's `composer.json` file to require `cornford/setter`.

"require": {
"cornford/setter": "2.*"
"cornford/setter": "3.*"
}

Next, update Composer from the Terminal:
Expand All @@ -31,25 +33,25 @@ Next, update Composer from the Terminal:

We now have to publish the packages assets with the following command:

php artisan vendor:publish --provider="Cornford\\Setter\\SettingServiceProvider"
php artisan vendor:publish --provider="Cornford\Setter\Providers\SettingServiceProvider" --tag=setting

We now have to migrate the package database table with the following command:

php artisan migrate

Once this operation completes, the next step is to add the service provider. Open `config/app.php`, and add a new item to the providers array.

'Cornford\Setter\SettingServiceProvider',
Cornford\Setter\Providers\SettingServiceProvider::class,

The final step is to introduce the facade. Open `config/app.php`, and add a new item to the aliases array.

'Setting' => 'Cornford\Setter\Facades\SettingFacade',
'Setting' => Cornford\Setter\Facades\SettingFacade::class,

That's it! You're all set to go.

## Configuration

You can now configure Setter in a few simple steps. Open `app/config/packages/cornford/setter/config.php` and update the options as needed.
You can now configure Setter in a few simple steps. Open `config/packages/cornford/setter/config.php` and update the options as needed.

- `cache` - Enable caching to improve performance by reducing database calls.
- `tag` - A tag prefixed to all cache items, e.g. tag::.
Expand Down
30 changes: 21 additions & 9 deletions composer.json
@@ -1,6 +1,6 @@
{
"name": "cornford/setter",
"description": "An easy way to intergrate Database Settings with Laravel.",
"description": "An easy way to integrate Database Settings with Laravel.",
"keywords": ["laravel", "setting", "config", "configuration", "database"],
"license": "MIT",
"authors": [
Expand All @@ -10,20 +10,32 @@
}
],
"require": {
"php": ">=5.4.0",
"illuminate/cache": "^5.0 || ^6.0",
"illuminate/config": "^5.0 || ^6.0",
"illuminate/database": "^5.0 || ^6.0",
"illuminate/support": "^5.0 || ^6.0"
"php": ">=7.2",
"ext-json": "*",
"illuminate/cache": "^6.0",
"illuminate/config": "^6.0",
"illuminate/database": "^6.0",
"illuminate/support": "^6.0"
},
"require-dev": {
"phpspec/phpspec": "2.0.*@dev",
"mockery/mockery": "0.9.1"
"phpspec/phpspec": "^6.0",
"mockery/mockery": "^1.2.4",
"phpunit/phpunit": "^8.4"
},
"autoload": {
"psr-0": {
"Cornford\\Setter": "src/"
}
},
"minimum-stability": "stable"
"minimum-stability": "stable",
"extra": {
"laravel": {
"providers": [
"Cornford\\Setter\\Providers\\SettingServiceProvider"
],
"aliases": {
"Setting": "Cornford\\Setter\\Facades\\SettingFacade"
}
}
}
}

0 comments on commit f9d5929

Please sign in to comment.