RoleRequest.php
572 Bytes
<?php
namespace App\Http\Container\AdminSection\Requests\System;
use Hikoon\LaravelApi\Support\ApiRequest;
class RoleRequest extends ApiRequest
{
public function rules(): array
{
return [
'name' => 'required|string|max:64',
'intro' => 'sometimes|string|max:1000'
];
}
public function messages(): array
{
return [
'name.required' => '请输入名称',
'name.max' => '名称超出最大限制',
'intro.max' => '描述超出最大限制'
];
}
}