add setting() helper; fix invalid defaults for mysql in table

This commit is contained in:
Nabeel Shahzad
2017-12-09 21:56:26 -06:00
parent 3a22062cd2
commit f2add8908b
7 changed files with 60 additions and 6 deletions

16
app/Support/helpers.php Normal file
View File

@@ -0,0 +1,16 @@
<?php
/**
* Shortcut for retrieving a setting value
*/
if (!function_exists('setting')) {
function setting($key, $value = null)
{
$settingRepo = app('setting');
if($value === null) {
return $settingRepo->get($key);
} else {
$settingRepo->set($key, $value);
}
}
}