12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace App\Http\Requests;
- use Illuminate\Foundation\Http\FormRequest;
- class BoxBindingRequest 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()
- {
- $id = (int)optional($this->route('box'))->id;
- return [
- //
- // 'box_no' => 'required|unique:box_binding,box_no,' . $id,
- 'box_no' => 'required',
- 'batch' => 'required',
- 'device_xing' => 'required',
- 'manufacturer' => 'required',
- 'bluetooth_token' => '',
- 'bluetooth_mac' => '',
- 'imei_no' => '',
- 'iccid_no' => '',
- 'sim_no' => '',
- 'imsi_no' => '',
- 'mold' => 'required',
- 'merchant_id' => ''
- ];
- }
- public function attributes()
- {
- return [
- 'batch' => '批次',
- 'box_no' => '控制设备编号',
- 'device_xing' => '中控型号',
- 'manufacturer' => '厂商',
- 'mold' => '控制器型号'
- ];
- }
- }
|