Skip to content

Commit

Permalink
add dump and dd methods
Browse files Browse the repository at this point in the history
  • Loading branch information
d8vjork committed Apr 18, 2024
1 parent 4eac685 commit 08d0187
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/DataTransferObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,24 @@ public function withDefaults(): void
//
}

/**
* Call dump on this data transfer object then return itself.
*/
public function dump(): self
{
dump($this);

return $this;
}

/**
* Call dd on this data transfer object.
*/
public function dd(): void
{
dd($this);
}

/**
* Get the instance as an array.
*
Expand Down

0 comments on commit 08d0187

Please sign in to comment.