File tree Expand file tree Collapse file tree 1 file changed +21
-5
lines changed Expand file tree Collapse file tree 1 file changed +21
-5
lines changed Original file line number Diff line number Diff line change 1
1
#Instalation
2
- ``` json
2
+ ```
3
3
php composer.phar install black-lamp/yii2-imagable
4
4
```
5
+ or add
5
6
7
+ ``` json
8
+ "black-lamp/yii2-imagable" : " *"
9
+ ```
10
+ to the ` require ` section of your composer.json.
6
11
#Confiugation
7
12
After extension is installed you need to setup imagable application component:
8
13
``` php
@@ -15,6 +20,9 @@ After extension is installed you need to setup imagable application component:
15
20
'galery' => [
16
21
'origin' => true,
17
22
],
23
+ 'galery/more' => [
24
+ 'origin' => false,
25
+ ],
18
26
'avatars' => [
19
27
'size' => [
20
28
'big' => [
@@ -29,10 +37,18 @@ After extension is installed you need to setup imagable application component:
29
37
```
30
38
31
39
#Usage
40
+
41
+ ###Create image
32
42
``` php
33
43
$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);
38
54
```
You can’t perform that action at this time.
0 commit comments