Skip to content

Commit 719f048

Browse files
committed
How to use basic attr
1 parent 22be43f commit 719f048

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,26 @@ Example:
4242
* @var OpenGraph $openGraph
4343
*/
4444
$openGraph = Yii::$app->opengraph;
45-
4645
```
4746

4847

4948

5049
#### How to use
5150

52-
```
53-
51+
Add basic attributes:
52+
53+
```php
54+
/**
55+
* @var OpenGraph $openGraph
56+
*/
57+
$openGraph = Yii::$app->opengraph;
58+
59+
$openGraph->getBasic()
60+
->setUrl('https://umanskyi.com')
61+
->setTitle('My_Article_Title')
62+
->setDescription('My_Article_Description)
63+
->setSiteName('My_Site_Name')
64+
->setLocale('pl_PL')
65+
->setLocalAlternate(['fr_FR', 'en_US'])
66+
->render();
5467
```

0 commit comments

Comments
 (0)