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

29 lines
543 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 TutorialSort extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
2020-04-20 16:07:06 +08:00
'tutorial_ids' => 'required|array'
2020-04-16 23:01:18 +08:00
];
}
public function messages()
{
return [
2020-04-20 16:07:06 +08:00
'tutorial_ids.required' => '教程ID不能为空',
'tutorial_ids.array' => '教程ID格式有误'
2020-04-16 23:01:18 +08:00
];
}
}