Skip to content

Commit 33bbb68

Browse files
committed
Change README.md
1 parent 71aa12a commit 33bbb68

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
#Instalation
2-
``` json
2+
```
33
php composer.phar install black-lamp/yii2-imagable
44
```
5+
or add
56

7+
```json
8+
"black-lamp/yii2-imagable": "*"
9+
```
10+
to the `require` section of your composer.json.
611
#Confiugation
712
After extension is installed you need to setup imagable application component:
813
```php
@@ -15,6 +20,9 @@ After extension is installed you need to setup imagable application component:
1520
'galery' => [
1621
'origin' => true,
1722
],
23+
'galery/more' => [
24+
'origin' => false,
25+
],
1826
'avatars' => [
1927
'size' => [
2028
'big' => [
@@ -29,10 +37,18 @@ After extension is installed you need to setup imagable application component:
2937
```
3038

3139
#Usage
40+
41+
###Create image
3242
```php
3343
$imageName = \Yii::$app->imagable->create('avatars', 'pathToImage');
34-
/*
35-
your code
36-
*/
37-
\Yii::$app->imagable->get('avatars', 'big', $imageName);
44+
```
45+
46+
###Get Image
47+
```php
48+
$fullPathToImage = \Yii::$app->imagable->get('avatars', 'big', $imageName);
49+
```
50+
51+
###Delete Image
52+
```php
53+
$isDeleted = \Yii::$app->imagable->delete('avatars', $imageName);
3854
```

0 commit comments

Comments
 (0)