Exists.php 377B

1234567891011121314151617181920212223
  1. <?php
  2. namespace Illuminate\Validation\Rules;
  3. class Exists
  4. {
  5. use DatabaseRule;
  6. /**
  7. * Convert the rule to a validation string.
  8. *
  9. * @return string
  10. */
  11. public function __toString()
  12. {
  13. return rtrim(sprintf('exists:%s,%s,%s',
  14. $this->table,
  15. $this->column,
  16. $this->formatWheres()
  17. ), ',');
  18. }
  19. }