領収証発行サービス
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

35 řádky
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. }