hungnm1518 / laravel-html-dom-parser
Laravel wrapper for the PHP Simple HTML DOM Parser package
1.3.2
2024-04-24 18:14 UTC
Requires
- php: ^8.0
- illuminate/support: ^8.0|^9.0|^10.0|^11.0
- kub-at/php-simple-html-dom-parser: ^1.8
README
Laravel wrapper for the PHP Simple HTML DOM Parser package
Instalation
Require this package with composer:
composer require hungnm1518/laravel-html-dom-parser
You need to add the service provider in app.php
HungNM\LaravelHtmlDomParser\ServiceProvider::class,
If you want to use the facade, add this to your facades in app.php
'HTMLDomParser' => HungNM\LaravelHtmlDomParser\Facade::class
Usage
$name = HTMLDomParser::str_get_html($html)->find('div.profile > span.name > span')[0]->plaintext;