it-yakutia / yii2-gallery
Gallery module for Yii2
Installs: 113
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:JavaScript
Type:yii2-extension
README
Gallery module for Yii2
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist it-yakutia/yii2-gallery "*"
or add
"it-yakutia/yii2-gallery": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply add in your console config:
'controllerMap' => [ ... 'migrate' => [ ... 'migrationPath' => [ ... '@it-yakutia/gallery/src/migrations', ... ], ], ],
And just run the command:
php yii migrate
Set in common config params:
return [ /* ... */ 'domain' => 'https://yourdomain.example', ];
Add urls in your backend project:
Url::toRoute('/gallery/back/index');
Add RBAC roles:
blog
Custom view file:
'custom_view_for_modules' => [ 'gallery_front' => [ 'view' => '@frontend/views/front_page/view', ], ],
Add fixtures:
php yii fixture GalleryPhoto --namespace='ityakutia\gallery\tests\fixtures'
Add fixtures in docker:
php yii fixture GalleryPhoto --namespace='ityakutia\gallery\tests\fixtures' --interactive=0