admin init command
This commit is contained in:
1 parent
0f05bc2391
commit
a48088581f
25 files changed
+376
-34
No files matched your search
@@ -35,6 +35,20 @@ class OptionService
|
||||
return false;
|
||||
}
|
||||
|
||||
public function createFromParams(string $key, string $value, string $label): false|Option
|
||||
{
|
||||
$model = new Option();
|
||||
$model->key = $key;
|
||||
$model->value = $value;
|
||||
$model->label = $label;
|
||||
|
||||
if ($model->save()) {
|
||||
return $model;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// public function createOptionArr(): array
|
||||
// {
|
||||
// foreach (Option::all()->toArray() as $option) {
|
||||
|
||||
Reference in new issue
Block a user