Download the PHP package aminkt/yii2-category-module without Composer
On this page you can find all versions of the php package aminkt/yii2-category-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yii2-category-module
category manager
Category Module
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file.
Configuration
Once the extension is installed, simply use it in your code by :
- Add module configuration to your config file in module section like as:
Note: You can leave
modelClass
andsearchModelClass
blank to use default models of module. If you are using mongo db, you can use models implemented in\saghar\category\models\mongo
- Run migration files of module using
yii migrate --migrationPath=@vendor/saghar/yii2-category-module/src/migrations --interactive=0
Note: If you are using mongo db please skip this step.
Advanced configuration
If you want use your own model feel free to write your own code but please be aware about this steps to configurate your your app using Category module.
-
Create your own Active record and implement
\saghar\category\interfaces\CategoryInterface
- In you configuration file define your models like described in configuration section.
Done.
Use Category module api to create, update, delete and fetch your categories.
You can use \saghar\category\controllers\RestApiController
and extend your controller from this file.
This file will provide below actions and routes:
Note: All request except index and view shoud use at least one auth method to authrize user.
Warning: Cross origin is disabled by default. if you have any problem with this please report it.
CONTRIBUTING
If you want help us to improve this module please check this linkg.
All versions of yii2-category-module with dependencies
aminkt/yii2-tree-view-widget Version dev-master
aminkt/yii2-custom-exceptions Version dev-master
aminkt/yii2-input-tag-widget Version dev-master
aminkt/yii2-alert-widget Version dev-master
kartik-v/yii2-widget-select2 Version @dev