user(); return $user->isAdmin(); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ ]; } public function prepareForValidation() { $input = $this->input(); if(isset($input['smtp_username']) && $input['smtp_username'] == '********') unset($input['smtp_username']); if(isset($input['smtp_password'])&& $input['smtp_password'] == '********') unset($input['smtp_password']); $this->replace($input); } }