Package Data | |
---|---|
Maintainer Username: | cucxabeng |
Maintainer Contact: | cucxabeng@gmail.com (HaiDang) |
Package Create Date: | 2016-01-01 |
Package Last Update: | 2019-08-08 |
Home Page: | |
Language: | PHP |
License: | Unknown |
Last Refreshed: | 2025-04-28 15:04:01 |
Package Statistics | |
---|---|
Total Downloads: | 2,591 |
Monthly Downloads: | 1 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 1 |
Total Forks: | 2 |
Total Open Issues: | 1 |
Add library Simple html dom to Laravel 5. More document: http://simplehtmldom.sourceforge.net/
Add the following line to the require
section of composer.json
:
{
"require": {
"cucxabeng/simple-html-dom": "dev-master"
}
}
Add the service provider to config/app.php
:
'providers' => array(
...
'cucxabeng\HtmlDom\HtmlDomServiceProvider',
//Laravel 5.1
'cucxabeng\HtmlDom\HtmlDomServiceProvider::class',
...
Add alias to config/app.php
:
'aliases' => array(
...
'HtmlDom' => 'cucxabeng\HtmlDom\HtmlDom',
//Laravel 5.1
'HtmlDom' => 'cucxabeng\HtmlDom\HtmlDom::class',
...
$dom = new HtmlDom('http://www.example.com');
//or
$dom = new HtmlDom('<p>Hello</p>');