mirror of
https://github.com/v2board/v2board.git
synced 2024-11-15 00:09:13 +08:00
32 lines
649 B
PHP
32 lines
649 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',
|
|
'icon' => 'required'
|
|
];
|
|
}
|
|
|
|
public function messages()
|
|
{
|
|
return [
|
|
'title.required' => '标题不能为空',
|
|
'description.required' => '描述不能为空',
|
|
'icon.required' => '图标不能为空'
|
|
];
|
|
}
|
|
}
|