Dumpable.php 497 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace Illuminate\Support\Traits;
  3. trait Dumpable
  4. {
  5. /**
  6. * Dump the given arguments and terminate execution.
  7. *
  8. * @param mixed ...$args
  9. * @return never
  10. */
  11. public function dd(...$args)
  12. {
  13. $this->dump(...$args);
  14. dd();
  15. }
  16. /**
  17. * Dump the given arguments.
  18. *
  19. * @param mixed ...$args
  20. * @return $this
  21. */
  22. public function dump(...$args)
  23. {
  24. dump($this, ...$args);
  25. return $this;
  26. }
  27. }