Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
cacing69 committed Sep 9, 2023
1 parent 40c6dce commit 039456c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,27 @@ $result = $query
->get(); // -> return type is \Doctrine\Common\Collections\ArrayCollection
```

or u can use raw method

```php
require_once 'vendor/autoload.php';

$html = file_get_contents("src/Samples/sample.html");
$data = new Cacing69\Cquery\Cquery($html);

$result = $query
->raw("
from (#lorem .link)
define
h1 as title,
a as description,
attr(href, a) as url,
attr(class, a) as class
filter
attr(class, a) has 'vip'
");
```

And here are the results

![Alt text](https://gcdnb.pbrd.co/images/Q6XHKRydSigl.png?o=1 "a title")
Expand Down

0 comments on commit 039456c

Please sign in to comment.