領収証発行サービス
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

35 行
524B

  1. <?php
  2. namespace App\Rules;
  3. use App\Models\Htpms\MstCustomer;
  4. class CustomerCode extends BaseRule
  5. {
  6. /**
  7. * Create a new rule instance.
  8. *
  9. * @return void
  10. */
  11. public function __construct()
  12. {
  13. }
  14. public function check($value) : bool
  15. {
  16. return MstCustomer::customerCode($value)->exists();
  17. }
  18. /**
  19. * Get the validation error message.
  20. *
  21. * @return string
  22. */
  23. public function message()
  24. {
  25. return trans('validation.exists');
  26. }
  27. }