'Override model in yii2 for mdmsoft/yii2-admin

I want to override the model in mdmsoft plugin of yii2. https://github.com/mdmsoft/yii2-admin

How can I do it?



Solution 1:[1]

it's a module, you have to create your own module inherent from mdm\admin\module. This link on how create a new module How to create modules in YII2

https://www.yiiframework.com/doc/guide/2.0/en/structure-modules

and in your config add the path of your config.

Original config

'admin' => [
    'class' => 'mdm\admin\Module',
    ...
]

New Config

'admin' => [
        'class' => 'new_module_name_space\Module',
        ...
    ]

You can create your model extends from yii2-amdin

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ?Amin