New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

zjango/phtml

simple_html_dom PHP Parser for Laravel
101
Install
composer require zjango/phtml
Latest Version:1.1.1
License:MIT
Last Updated:May 23, 2015
Links: GitHub  ·  Packagist
Maintainer: zjango

PHtml

========

Installation

To install the package, simply add the following to your Laravel installation's composer.json file

"require": {
	"laravel/framework": "5.*",
	"zjango/phtml": "dev-master"  
},

Run the usual composer update to pull the files. Then, add the following Service Provider to your providers array in your config/app.php config.

'providers' => array(
	...
	'Zjango\Phtml\PhtmlServiceProvider',
);

And finally add a new line to the aliases array:

		'Phtml'	=>	'Zjango\Phtml\Facades\Phtml',

Usage

		$html=Phtml::init('http://www.apple.com');
		$as = $html->find('a');
		$a = $html->find('a',0);
		$a = $html->find('a',-1);
		$a = $html->find('a',0);
		$href = $a->href();
		$text = $a->text();

Related Packages

doctrine/dbal

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

648,266,899 9,701
laravel/framework

The Laravel Framework.

604,216,237 34,982
laravel/tinker

Powerful REPL for the Laravel framework.

512,508,631 7,443
laravel/serializable-closure

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

429,221,767 607
nunomaduro/collision

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

407,699,310 4,663

Version History

Version Released License
1.1.1 MIT