This commit is contained in:
2024-09-24 17:22:09 +03:00
parent cb2c719b1b
commit 349c2992dc
13 changed files with 314 additions and 52 deletions

View File

@ -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) {