12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- namespace App\Http\Requests;
- use Illuminate\Foundation\Http\FormRequest;
- class InviteNewUsersConfigsRequest 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 [
- 'name' => 'required',
- 'background_image' => 'required',
- 'condition' => 'required',
- 'dynamic_item' => 'required',
- // 'card_id' => '',
- // 'is_give_coupon' => 'required',
- // 'coupon_id' => '',
- // 'coupon_num' => '',
- // 'balance' => 'required',
- 'is_repeat' => 'required',
- 'start_time' => '',
- 'end_time' => '',
- 'status' => 'required',
- 'area_id' => 'required',
- ];
- }
- public function attributes()
- {
- return [
- 'name' => '活动名称',
- 'background_image' => '背景图',
- 'num' => '邀请人人数量',
- 'condition' => '条件',
- 'is_give_card' => '是否赠卡',
- 'card_id' => '骑行卡',
- 'is_give_coupon' => '是否赠券',
- 'coupon_id' => '优惠券',
- 'coupon_num' => '优惠券数量',
- 'balance' => '余额',
- 'is_repeat' => '是否可重复任务',
- 'start_time' => '活动开始时间',
- 'end_time' => '活动结束时间',
- 'status' => '状态',
- 'area_id' => '区域',
- ];
- }
- }
|