File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 3
3
[ ![ Latest Unstable Version] ( https://poser.pugx.org/efriandika/laravel-settings/v/unstable.svg )] ( https://packagist.org/packages/efriandika/laravel-settings )
4
4
[ ![ License] ( https://poser.pugx.org/efriandika/laravel-settings/license.svg )] ( https://packagist.org/packages/efriandika/laravel-settings )
5
5
6
- # This Branch is Experimental || [ Stable] ( https://github.com/efriandika/laravel-settings/tree/master )
7
-
8
6
# Laravel-Settings
9
7
Laravel 5 Persistent Settings (Database + Cache)
10
8
@@ -16,7 +14,7 @@ Require this package with composer ([Packagist](https://packagist.org/packages/e
16
14
or modify your ` composer.json ` :
17
15
18
16
"require": {
19
- "efriandika/laravel-settings": "dev-labs "
17
+ "efriandika/laravel-settings": "1.* "
20
18
}
21
19
22
20
then run ` composer update ` :
@@ -52,9 +50,15 @@ Get a value
52
50
$value = Settings::get('key');
53
51
54
52
Get a value with Default Value.
53
+
54
+ $value = Settings::get('key', 'Default Value');
55
+
55
56
> Note: If key is not found (null) in cache or settings table, it will return default value
56
57
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');
58
62
59
63
Forget a value
60
64
@@ -66,7 +70,7 @@ Forget all values
66
70
67
71
### To Do
68
72
69
- - Add ` settings(key) ` helper as an alternative in blade templating
73
+ -
70
74
71
75
### License
72
76
You can’t perform that action at this time.
0 commit comments