cucxabeng / simple-html-dom
SimpleHtmlDom for Laravel 5
Installs: 2 533
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Open Issues: 1
Requires
- php: >=5.3.3
This package is not auto-updated.
Last update: 2024-11-09 19:22:03 UTC
README
Add library Simple html dom to Laravel 5. More document: http://simplehtmldom.sourceforge.net/
Installation
Add the following line to the require
section of composer.json
:
{ "require": { "cucxabeng/simple-html-dom": "dev-master" } }
Laravel Setup
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', ...
Usage
$dom = new HtmlDom('http://www.example.com'); //or $dom = new HtmlDom('<p>Hello</p>');