zjango / phtml
simple_html_dom PHP Parser for Laravel
Installs: 101
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/zjango/phtml
Requires
- ext-dom: *
- zjango/laracurl: >=1.1.1
This package is not auto-updated.
Last update: 2025-10-11 23:43:31 UTC
README
========
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();