v2board/app/Http/Requests/Admin/TutorialSave.php
2020-01-02 21:38:32 +08:00

30 lines
568 B
PHP

<?php
namespace App\Http\Requests\Admin;
use Illuminate\Foundation\Http\FormRequest;
class TutorialSave extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'title' => 'required',
'description' => 'required',
];
}
public function messages()
{
return [
'title.required' => '标题不能为空',
'description.required' => '描述不能为空',
];
}
}