kernel update

This commit is contained in:
2024-12-16 14:26:13 +03:00
parent 589cf81e49
commit f5ad07c04a
77 changed files with 2067 additions and 251 deletions

View File

@ -35,7 +35,7 @@ class OptionService
return false;
}
public function createFromParams(string $key, string $value, string $label): false|Option
public static function createFromParams(string $key, string $value, string $label): false|Option
{
$model = new Option();
$model->key = $key;
@ -63,6 +63,17 @@ class OptionService
return false;
}
public static function removeOptionByKey(string $key): bool
{
$option = Option::where("key", $key)->first();
if (!$option){
return false;
}
$option->delete();
return true;
}
// public function createOptionArr(): array
// {
// foreach (Option::all()->toArray() as $option) {