File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ The preferred way to install this extension is through [composer](http://getcomp
10
10
Either run
11
11
12
12
```
13
- php composer.phar require --prefer-dist shintio/yii2-proxy-httpclient "*"
13
+ composer require --prefer-dist shintio/yii2-proxy-httpclient "*"
14
14
```
15
15
16
16
or add
@@ -21,11 +21,25 @@ or add
21
21
22
22
to the require section of your ` composer.json ` file.
23
23
24
+ Apply migrations by following command:
25
+ ``` bash
26
+ php yii migrate --migrationPath=" vendor/shintio/yii2-proxy-httpclient/src/database/migrations/"
27
+ ```
24
28
25
29
Usage
26
30
-----
27
31
28
- Once the extension is installed, simply use it in your code by :
32
+ Once the extension is installed, simply use it in your code like :
29
33
30
34
``` php
31
- <?= \shintio\yii2\proxy\AutoloadExample::widget(); ?>```
35
+ use shintio\yii2\proxy\components\Client;
36
+
37
+ $client = new Client();
38
+
39
+ $request = $client->createRequest()->setMethod('get')->setUrl('https://2ip.ru/');
40
+
41
+ $response = $request->send();
42
+
43
+ echo $response->content;
44
+ die;
45
+ ```
You can’t perform that action at this time.
0 commit comments