This commit is contained in:
apuc committed 2024-09-24 17:22:09 +03:00
1 parent cb2c719b1b
commit 349c2992dc
13 files changed
+314 -52

No files matched your search

@@ -49,6 +49,20 @@ class OptionService
return false;
}
/**
* @param $key
* @return false|array|string
*/
public static function getItem($key): false|array|string
{
$item = Option::where("key", $key)->first();
if ($item){
return getConst($item->value);
}
return false;
}
// public function createOptionArr(): array
// {
// foreach (Option::all()->toArray() as $option) {