========
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',
$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();