/var/www/vhosts/nabawater/backend/modules/delivery/models
NameSizeModeActions
DeliveryBoy.php81530644editdlrm
DeliveryBoySearch.php54460644editdlrm
Edit: /var/www/vhosts/nabawater/backend/modules/delivery/models/DeliveryBoy.php (8153B)
[ self::SCENARIO_REGISTER_FRONTEND, ] ], [ [ 'name', 'address', 'city', 'email', 'country', 'phone_number', 'password', 'identity_number', 'license_number', 'license_expiry_date', 'vehicle_number', 'dob', 'password', 'gender', // 'stripe_account_id' ], 'required', 'on' => [ self::SCENARIO_REGISTER_BACKEND ] ], [ [ 'dob', 'identity_number', 'license_number', 'image', 'license_expiry_date', 'email', 'vehicle_number', 'stripe_account_id' ], 'safe', ], [ [ 'phone_number', 'device_type' ], 'integer' ], [ [ 'email' ], 'email', ], [ [ 'gender' ], 'default', 'value' => 0 ], [ [ 'confirm_password' ], 'compare', 'compareAttribute' => 'password', 'skipOnEmpty' => false, 'skipOnError' => false ], [ ['image'], 'file', 'skipOnEmpty' => true, 'maxSize' => 1024 * 1024 * 10, 'mimeTypes' => ['image/png', 'image/jpg', 'image/jpeg'] ], [ ['password'], 'string', 'min' => 6, ], [ ['phone_number'], 'match', 'pattern' => '/^[0-9]{7,15}$/', 'message' => Yii::t('backend', 'Mobile accept only 7 to 15 digit numbers'), 'skipOnEmpty' => true, 'skipOnError' => true ], [ 'terms', 'required', 'requiredValue' => 1, 'message' => yii::t('frontend','Accept tearms and conditions'), 'on' => self::SCENARIO_REGISTER_FRONTEND, ], [ [ 'password', 'confirm_password', 'drivers_id', ], 'required', 'on' => [ self::SCENARIO_CHANGE_PASSWORD ] ], ]; return ArrayHelper::merge(parent::rules(), $rules); } /** * @inheritdoc */ public function attributeLabels() { $labels = [ 'name' => Yii::t('backend', 'Delivery Boy Name'), 'address' => Yii::t('backend', 'Address'), 'city' => Yii::t('backend', 'City'), 'country' => Yii::t('backend', 'Country'), 'phone_number' => Yii::t('backend', 'Phone Number'), 'dob' => Yii::t('backend', 'Date of Birth'), 'gender' => Yii::t('backend', 'Gender'), 'password' => Yii::t('backend', 'Password'), 'confirm_password' => Yii::t('backend', 'Confirm Password'), 'identity_number' => Yii::t('backend', 'Identify Number'), 'license_number' => Yii::t('backend', 'Licence Number'), 'license_expiry_date' => Yii::t('backend', 'Licence Expiry Date'), 'device_type' => Yii::t('backend', 'Device Type'), 'device_token' => Yii::t('backend', 'Device Token'), 'image' => Yii::t('backend', 'Licence Image'), 'vendor_key' => Yii::t('backend', 'Branch Name'), 'bank_name' => Yii::t('backend', 'Bank Name'), 'bank_branch_code' => Yii::t('backend', 'Bank Branch Code'), 'account_number' => Yii::t('backend', 'Account Number'), 'swift_code' => Yii::t('backend', 'Swift Code'), 'branch_name' => Yii::t('backend', 'Branch Name'), 'is_approved' => Yii::t('backend', 'Approve Status') ]; return ArrayHelper::merge(parent::attributeLabels(), $labels); } public function scenarios() { $scenarios = parent::scenarios(); $scenarios[self::SCENARIO_REGISTER_BACKEND] = [ 'name', 'email', 'company_id', 'address', 'city', 'country', 'dob', 'identity_number', 'license_number', 'license_expiry_date', 'is_approved', 'vehicle_number', 'phone_number', 'password', 'confirm_password', 'gender', // 'stripe_account_id' ]; $scenarios[self::SCENARIO_REGISTER_FRONTEND] = [ 'name', 'company_id', 'address', 'city', 'email', 'license_number', 'vehicle_number', 'country', 'phone_number', 'password', 'confirm_password', 'device_token', 'gender', // 'stripe_account_id', 'terms' ]; $scenarios[self::SCENARIO_CHANGE_PASSWORD] = [ 'password', 'confirm_password', 'drivers_id', ]; return $scenarios; } }