修复 模块 WeCom Key 显示和更新

This commit is contained in:
iVampireSP.com 2023-01-13 22:11:02 +08:00
parent 7640b889f9
commit 43d02ca500
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
2 changed files with 4 additions and 4 deletions

View File

@ -34,8 +34,6 @@ public function index(Module $module): View
*/
public function create(): View
{
//
return view('admin.modules.create');
}
@ -74,7 +72,7 @@ private function rules(): array
'name' => 'required|string|max:255',
'url' => 'required|url',
'status' => 'required|string|in:up,down,maintenance',
'wecom_key' => 'required|string|max:255',
'wecom_key' => 'nullable|string|max:255',
];
}
@ -103,6 +101,8 @@ public function show(Module $module): View
*/
public function edit(Module $module): View
{
$module = $module->makeVisible('wecom_key');
return view('admin.modules.edit', compact('module'));
}

View File

@ -28,7 +28,7 @@
<div class="form-group mt-1">
<label for="name">企业微信 群机器人 WebHook Key</label>
<input type="text" class="form-control" id="wecom_key" name="wecom_key">
<input type="text" class="form-control" id="wecom_key" name="wecom_key" value="{{ $module->wecom_key }}" autocomplete="off">
</div>
<div class="form-group mt-1">