-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcrud
135 lines (94 loc) · 3.12 KB
/
crud
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
common\models\Users
common\models\UsersSearch
backend\controllers\UsersController
@backend/views/users
common\models\Transactions
common\models\TransactionsSearch
frontend\controllers\TransactionsController
@frontend/views/transactions
common\models\ExchangeRates
common\models\ExchangeRatesSearch
frontend\controllers\ExchangeRatesController
@frontend/views/exchange-rates
common\models\UsersWallets
common\models\UsersWalletsSearch
frontend\controllers\UsersWalletsController
@frontend/views/users-wallets
Form Generator
frontend/views/UsersWallets/currency-exchangeForm
common\models\UsersWallets
@frontend/views/users-wallets
Extension Generator
http://www.yiiframework.com/doc-2.0/guide-structure-extensions.html
Vendor Name
artembaranovsky
Package Name
yii2-get-currency-rates
Namespace
artembaranovsky\
Type
yii2-extension
Title
Extention to get currency rates
Description
Extention to get criptocurrency rates using API https://coinlayer.com
Author Name
Artem Baranovsky
Author Email
The extension has been generated successfully.
To enable it in your application, you need to create a git repository and require it via composer.
cd W:\domains\ewallet\frontend\runtime\tmp-extensions/yii2-get-currency-rates
git init
git add -A
git commit
git remote add origin https://path.to/your/repo
git push -u origin master
The next step is just for initial development, skip it if you directly publish the extension on packagist.org
Add the newly created repo to your composer.json.
"repositories":[
{
"type": "git",
"url": "https://path.to/your/repo"
}
]
Note: You may use the url file://W:\domains\ewallet\frontend\runtime\tmp-extensions/yii2-get-currency-rates for testing.
Require the package with composer
composer.phar require artembaranovsky/yii2-get-currency-rates:dev-master
And use it in your application.
\artembaranovsky\AutoloadExample::widget();
When you have finished development register your extension at packagist.org.
generated runtime\tmp-extensions\yii2-get-currency-rates\composer.json
generated runtime\tmp-extensions\yii2-get-currency-rates\AutoloadExample.php
generated runtime\tmp-extensions\yii2-get-currency-rates\README.md
w:\domains\ewallet\common\config\main.php
return [
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
'@getCurrencyRates' => '@vendor/artembaranovsky/yii2-get-currency-rates',
],
'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
'components' => [
'cache' => [
'class' => 'yii\caching\FileCache',
],
],
];
http://ewallet/backend/web/gii/module
Module Generator
This generator helps you to generate the skeleton code needed by a Yii module.
Module Class
common\modules\GetCurrencyRates
Module ID
yii2-get-currency-rates
The module has been generated successfully.
To access the module, you need to add this to your application configuration:
......
'modules' => [
'yii2-get-currency-rates' => [
'class' => 'common\modules\GetCurrencyRates',
],
],
......
http://ewallet/backend/web/yii2-get-currency-rates