Search code examples
yiigii

Yii: How to create crud operations for a model in a module?


There is a model(Message) located in message module. How can I create crud operations for this model outside of the module. Simply I want to create a crud operation (not in module), but my model is located in message module model directory.
First possible solution is copying Message model to Yii base model directory. Is there any other systematic way to create my crud operations?


Solution

  • You can do it with gii. Provide application.modules.message.models.Message in the Model class field of Crud Generator page.