update tutorial

This commit is contained in:
Tokumeikoi 2020-02-18 22:48:00 +08:00
parent a0454577cb
commit 61b31c1925

View File

@ -9,7 +9,7 @@ class TutorialSave extends FormRequest
CONST RULES = [ CONST RULES = [
'title' => 'required', 'title' => 'required',
// 1:windows 2:macos 3:ios 4:android 5:linux 6:router // 1:windows 2:macos 3:ios 4:android 5:linux 6:router
'category' => 'required|in:1,2,3,4,5,6', 'category_id' => 'required|in:1,2,3,4,5,6',
'description' => 'required', 'description' => 'required',
'icon' => 'required' 'icon' => 'required'
]; ];
@ -27,8 +27,8 @@ class TutorialSave extends FormRequest
{ {
return [ return [
'title.required' => '标题不能为空', 'title.required' => '标题不能为空',
'category.required' => '分类不能为空', 'category_id.required' => '分类不能为空',
'category.in' => '分类格式不正确', 'category_id.in' => '分类格式不正确',
'description.required' => '描述不能为空', 'description.required' => '描述不能为空',
'icon.required' => '图标不能为空' 'icon.required' => '图标不能为空'
]; ];