cucxabeng/simple-html-dom

SimpleHtmlDom for Laravel 5
2,672 1
Install
composer require cucxabeng/simple-html-dom
PHP:>=5.3.3
Last Updated:Aug 8, 2019
Links: GitHub  ·  Packagist
Maintainer: cucxabeng

simple-html-dom

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>');

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

637,827,751 9,703
laravel/framework

The Laravel Framework.

584,532,650 34,931
laravel/tinker

Powerful REPL for the Laravel framework.

498,216,183 7,442
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

413,412,504 609
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

391,429,217 4,660