Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ignatenkovnikita/yii2-def-code
Yii2 Def Code Module
https://github.com/ignatenkovnikita/yii2-def-code
defcode yii2-component yii2-extension yii2-modules
Last synced: about 2 months ago
JSON representation
Yii2 Def Code Module
- Host: GitHub
- URL: https://github.com/ignatenkovnikita/yii2-def-code
- Owner: ignatenkovnikita
- Created: 2017-10-05T14:05:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-01-23T22:23:35.000Z (about 4 years ago)
- Last Synced: 2024-11-13T14:55:57.713Z (2 months ago)
- Topics: defcode, yii2-component, yii2-extension, yii2-modules
- Language: PHP
- Size: 46.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# yii2-def-code
Yii2 Def Code Module### Install
```bash
composer require ignatenkovnikita/yii2-def-code:dev-master
```Add to backend config
```php
'defcode' => [
'class' => 'ignatenkovnikita\defcode\Module',
'controllerNamespace' => \ignatenkovnikita\defcode\Module::backendControllerNamespace(),
'viewPath' => '@vendor/ignatenkovnikita/yii2-def-code/backend/views',
],
```Add to console config
```php
'bootstrap' => ['def-code']
'modules' => [
...
'def-code' => [
'class' => \ignatenkovnikita\defcode\Module::class,
'listUrl' => [
DefCode::TYPE_ABC9 => 'https://rossvyaz.ru/data/DEF-9xx.csv',
],
'smscLogin' => 'SMSC_LOGIN',
'smscPassword' => 'SMSC_PASSWORD',
],
...
],
```Apply Migration
```bash
./console/yii migrate/create --migrationPath=vendor/ignatenkovnikita/yii2-def-code/migrations/
```Workflow load and import data:
- Download files, command
```php
./console/yii def-code/download-all
```
- After import files, command
```php
./console/yii def-code/import
```
- Delete old files
```php
./console/yii def-code/delete-old-files
```Mnp download full and import
```bash
./console/yii mnp/download
./console/yii mnp/import
```
Mnp download detail, date yesterday, advise run in hour night
```bash
./console/yii mnp/download-detail
./console/yii mnp/import-detail
```TODO
- add test
- refactoring