12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace App\Http\Requests;
- use Illuminate\Foundation\Http\FormRequest;
- class DashboardReportRequest extends FormRequest
- {
- /**
- * Determine if the user is authorized to make this request.
- *
- * @return bool
- */
- public function authorize()
- {
- return true;
- }
- /**
- * Get the validation rules that apply to the request.
- *
- * @return array
- */
- public function rules()
- {
- return [
- //
- 'workstation_id' => 'required|string',
- 'period' => 'required|in:7days,30days',
- ];
- }
- public function messages()
- {
- return [
- 'workstation_id.required' => '请选择站点',
- 'workstation_id.string' => 'workstation_id类型不对',
- 'period.required' => '请选择时间',
- 'period.in' => '请选择时间',
- ];
- }
- }
|