12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace General\Requests\CompanyAuth;
- use General\Requests\Request;
- use General\Services\BaseAuthConfig;
- use Illuminate\Validation\Rule;
- class ChannelQueryRequest extends Request
- {
- use BaseAuthConfig;
- /**
- * Get the validation rules that apply to the request.
- *
- * @return array
- */
- public function rules()
- {
- return [
- 'channel_id' => ['required', 'integer', Rule::in($this->channel_ids)],
- 'start_time' => 'date',
- 'end_time' => 'date|after_or_equal:start_time',
- 'begin_date' => 'date',
- 'end_date' => 'date|after_or_equal:begin_date',
- ];
- }
- public function messages()
- {
- return array_merge(parent::messages(), [
- 'channel_id.in' => '站点未授权!'
- ]);
- }
- }
|