How do you use frontend/models and backend/models in yii2-advanced?

my model is basically in common/models, so I feel that frontend/models and backend/models directories are useless. Did you all use it?

Apr.09,2022

do not use model in direct use commom under frontend and backend. To establish model classes under frontend/models and backend/models , respectively, inherit common/models , and then use.

ide/2.0/structure-models-sharpbest-practices" rel=" nofollow noreferrer "> https://www.yiichina.com/doc/...

in the advanced application template, you can define a model base class common\ models\ Post , and then in the foreground application, define and use a specific model class that inherits common\ models\ Post frontend\ models\ Post . In the background application, you can similarly define backend\ models\ Post . Through this strategy, you know that frontend\ models\ Post only corresponds to the foreground application, and if you modify it, you don't have to worry about the modification affecting the background application.

I also write it all in common/models, which is common in front and background and easy to use.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bd0344-30ce0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bd0344-30ce0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?