login
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user