Skip to content

Commit 653c012

Browse files
committed
Add helpers
1 parent b07a3c4 commit 653c012

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
[![Latest Unstable Version](https://poser.pugx.org/efriandika/laravel-settings/v/unstable.svg)](https://packagist.org/packages/efriandika/laravel-settings)
44
[![License](https://poser.pugx.org/efriandika/laravel-settings/license.svg)](https://packagist.org/packages/efriandika/laravel-settings)
55

6-
# This Branch is Experimental || [Stable](https://github.com/efriandika/laravel-settings/tree/master)
7-
86
# Laravel-Settings
97
Laravel 5 Persistent Settings (Database + Cache)
108

@@ -16,7 +14,7 @@ Require this package with composer ([Packagist](https://packagist.org/packages/e
1614
or modify your `composer.json`:
1715

1816
"require": {
19-
"efriandika/laravel-settings": "dev-labs"
17+
"efriandika/laravel-settings": "1.*"
2018
}
2119
2220
then run `composer update`:
@@ -52,9 +50,15 @@ Get a value
5250
$value = Settings::get('key');
5351

5452
Get a value with Default Value.
53+
54+
$value = Settings::get('key', 'Default Value');
55+
5556
> Note: If key is not found (null) in cache or settings table, it will return default value
5657
57-
$value = Settings::get('key', 'Default Value');
58+
Get a value via an helper
59+
60+
$value = settings('key');
61+
$value = settings('key', 'default value');
5862

5963
Forget a value
6064

@@ -66,7 +70,7 @@ Forget all values
6670

6771
### To Do
6872

69-
- Add `settings(key)` helper as an alternative in blade templating
73+
-
7074

7175
### License
7276

0 commit comments

Comments
 (0)