mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 17:31:49 +08:00 
			
		
		
		
	update: add notice tags
This commit is contained in:
		| @@ -22,7 +22,8 @@ class NoticeController extends Controller | ||||
|         $data = $request->only([ | ||||
|             'title', | ||||
|             'content', | ||||
|             'img_url' | ||||
|             'img_url', | ||||
|             'tags' | ||||
|         ]); | ||||
|         if (!$request->input('id')) { | ||||
|             if (!Notice::create($data)) { | ||||
|   | ||||
| @@ -16,7 +16,8 @@ class NoticeSave extends FormRequest | ||||
|         return [ | ||||
|             'title' => 'required', | ||||
|             'content' => 'required', | ||||
|             'img_url' => 'nullable|url' | ||||
|             'img_url' => 'nullable|url', | ||||
|             'tags' => 'nullable|array' | ||||
|         ]; | ||||
|     } | ||||
|  | ||||
| @@ -25,7 +26,8 @@ class NoticeSave extends FormRequest | ||||
|         return [ | ||||
|             'title.required' => '标题不能为空', | ||||
|             'content.required' => '内容不能为空', | ||||
|             'img_url.url' => '图片URL格式不正确' | ||||
|             'img_url.url' => '图片URL格式不正确', | ||||
|             'tags.array' => '标签格式不正确' | ||||
|         ]; | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user