| Package Data | |
|---|---|
| Maintainer Username: | zjango |
| Maintainer Contact: | zjango@icloud.com (zjango) |
| Package Create Date: | 2015-04-17 |
| Package Last Update: | 2015-05-23 |
| Home Page: | https://github.com/zjango/Phtml |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-20 15:05:36 |
| Package Statistics | |
|---|---|
| Total Downloads: | 101 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 0 |
| Total Watchers: | 2 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
========
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();