Dumpable.php 480 B

123456789101112131415161718192021222324252627282930
  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. dd($this, ...$args);
  14. }
  15. /**
  16. * Dump the given arguments.
  17. *
  18. * @param mixed ...$args
  19. * @return $this
  20. */
  21. public function dump(...$args)
  22. {
  23. dump($this, ...$args);
  24. return $this;
  25. }
  26. }