PHPackages                             eelcol/laravel-html-dom - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. eelcol/laravel-html-dom

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

eelcol/laravel-html-dom
=======================

Laravel HTML Dom implementation

2.0.4(2y ago)05.7k↓60.6%MITPHPPHP ^8.0

Since Jan 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/eelcol/laravel-html-dom)[ Packagist](https://packagist.org/packages/eelcol/laravel-html-dom)[ RSS](/packages/eelcol-laravel-html-dom/feed)WikiDiscussions v2 Synced 3w ago

READMEChangelogDependencies (4)Versions (20)Used By (0)

Laravel HTML Dom
================

[](#laravel-html-dom)

A Laravel wrapper around the `Dom` classes of PHP.

Example
=======

[](#example)

- Load HTML:

```
$dom = SuperDom::loadHtml('');

```

- Search elements by class

```
$dom->getElementsByClassname('class', 'element');
$dom->getElementsByClassname(['class1','class2'], 'element');

```

- Perform a query

This query will find all divs which contains both `class1` and `class2` class.

```
$dom->query()
	->element('div')
	->class('class1')
	->class('class2')
	->get();

```

Multiple queries can be combined with `or`:

```
$dom->query()
	->element('div')
	->class('class1')
	->class('class2')
	->or(function ($q) {
		$q->element('ul')
			->class('list');
	})
	->get();

```

- Perform an XPath query on the document:

```
$dom->query("a[...]");

```

- Perform an XPath query on an element:

```
$elements = $dom->getElementsByTagName("a");
$element = $elements->first();

$element->xpath("....");

```

- Get the next sibling

```
$element->getNextSibling();
$element->getNextSibling("span");

```

Installation
============

[](#installation)

Require this package with composer.

```
composer require eelcol/laravel-html-dom:^2.0

```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~69 days

Recently: every ~6 days

Total

18

Last Release

801d ago

Major Versions

1.1.2 → 2.02024-02-15

PHP version history (3 changes)1.0.0PHP ^7.3.0

1.0.8PHP ^7.3.0|^8.0

1.1.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9012901?v=4)[eelcol](/maintainers/eelcol)[@eelcol](https://github.com/eelcol)

---

Top Contributors

[![eelcol](https://avatars.githubusercontent.com/u/9012901?v=4)](https://github.com/eelcol "eelcol (24 commits)")

---

Tags

laravelhtmldom

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eelcol-laravel-html-dom/health.svg)

```
[![Health](https://phpackages.com/badges/eelcol-laravel-html-dom/health.svg)](https://phpackages.com/packages/eelcol-laravel-html-dom)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[wearepixel/laravel-cart

A cart implementation for Laravel

1355.6k](/packages/wearepixel-laravel-cart)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
