Skip to content

Commit

Permalink
- add missing Dumpable Trait
Browse files Browse the repository at this point in the history
  • Loading branch information
hbagherzadegan committed Sep 27, 2023
1 parent 7f26a7c commit f3cad7c
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Traits/Dumpable.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace Illuminate\Support\Traits;

trait Dumpable
{
/**
* Dump the given arguments and terminate execution.
*
* @param mixed ...$args
* @return never
*/
public function dd(...$args)
{
$this->dump(...$args);

dd();
}

/**
* Dump the given arguments.
*
* @param mixed ...$args
* @return $this
*/
public function dump(...$args)
{
dump($this, ...$args);

return $this;
}
}

0 comments on commit f3cad7c

Please sign in to comment.