diff --git a/src/Dom/Elements.php b/src/Dom/Elements.php index 08e7fd2..cf94971 100644 --- a/src/Dom/Elements.php +++ b/src/Dom/Elements.php @@ -218,6 +218,19 @@ class Elements }); } + /** + * Gets the htmlOuter of all the elements + * + * @return \Illuminate\Support\Collection|\Tightenco\Collect\Support\Collection + */ + public function htmlOuters() + { + return $this->map(function($item){ + return trim($item->htmlOuter()); + }); + } + + /** * @return phpQueryObject */