Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Commit de7996b

Browse files
committed
Add app makeing object doc in readme
1 parent 84c9006 commit de7996b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ and the following Facade to the aliases part
2727

2828
and then you can run vendor:publish command for generating phantomjs config file
2929
```bash
30-
$ php artisan vendor:publish
30+
$ php artisan vendor:publish --provider="Josh\Component\PhantomJs\PhantomJsServiceProvider"
3131
```
3232

3333
## Basic Usage
@@ -36,9 +36,12 @@ The following illustrates how to make a basic GET request and output the page co
3636
```php
3737
use Josh\Component\PhantomJs\PhantomJs;
3838

39+
// you can use Facade or app make function to use phantomjs
40+
// ex: app('phantomjs') or \PhantomJs
41+
3942
$request = PhantomJs::getMessageFactory()->createRequest('http://google.com', 'GET');
4043

41-
$response = $client->getMessageFactory()->createResponse();
44+
$response = PhantomJs::getMessageFactory()->createResponse();
4245

4346
PhantomJs::send($request, $response);
4447

@@ -84,7 +87,7 @@ $request->setMargin('1cm');
8487

8588
$response = PhantomJs::getMessageFactory()->createResponse();
8689

87-
$client->send($request, $response);
90+
PhantomJs::send($request, $response);
8891
```
8992

9093
## License

0 commit comments

Comments
 (0)