v2board/app/Http/Requests/Admin/KnowledgeSort.php

29 lines
547 B
PHP
Raw Normal View History

2020-04-16 23:01:18 +08:00
<?php
namespace App\Http\Requests\Admin;
use Illuminate\Foundation\Http\FormRequest;
class KnowledgeSort extends FormRequest
2020-04-16 23:01:18 +08:00
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'knowledge_ids' => 'required|array'
2020-04-16 23:01:18 +08:00
];
}
public function messages()
{
return [
'knowledge_ids.required' => '知识ID不能为空',
'knowledge_ids.array' => '知识ID格式有误'
2020-04-16 23:01:18 +08:00
];
}
}