ProfileRequest.php 484 B

123456789101112131415161718
  1. <?php
  2. namespace catchAdmin\permissions\request;
  3. use catchAdmin\permissions\model\Users;
  4. use catcher\base\CatchRequest;
  5. class ProfileRequest extends CatchRequest
  6. {
  7. protected function rules(): array
  8. {
  9. // TODO: Implement rules() method.
  10. return [
  11. 'username|用户名' => 'require|unique:'.Users::class.',username,' . $this->user()->id,
  12. 'email|邮箱' => 'email|unique:'.Users::class . ',email,' . $this->user()->id,
  13. ];
  14. }
  15. }