ActivityManagerUpdateRequest.php
674 Bytes
<?php
namespace App\Http\Container\AdminSection\Requests\Audition;
use Hikoon\LaravelApi\Support\ApiRequest;
class ActivityManagerUpdateRequest extends ApiRequest
{
protected function prepareForValidation(): void
{
$this->merge([
'expand->permission' => $this->input('permission', [])
]);
}
public function rules(): array
{
return [
'expand->permission' => 'required|array'
];
}
public function messages(): array
{
return [
'expand->permission.required' => '请选择权限',
'expand->permission.array' => '权限类型错误'
];
}
}