There are N methods of the same class in an AdminController. class. php, and how to separate them. For example, can setUser, deleteUser, and updateUser be separated into one file? For example, setMoney, deleteMoney, and updateMoney can be separated... An AdminController. class. php contains N methods of the same class and how to separate them.
For example, can setUser, deleteUser, and updateUser be separated into one file?
For example, can setMoney, deleteMoney, and updateMoney be separated into one file?
How to create folders for separation. And how to reference them to AdminController. class. php. What should they do with their corresponding templates? Should they be changed?
Thank you!
Reply content:
There are N methods of the same class in an AdminController. class. php, and how to separate them.
For example, can setUser, deleteUser, and updateUser be separated into one file?
For example, can setMoney, deleteMoney, and updateMoney be separated into one file?
How to create folders for separation. And how to reference them to AdminController. class. php. What should they do with their corresponding templates? Should they be changed?
Thank you!
Background Management is not necessary.
If you really want to tell it out, there are two ways:
Directly write those functions to several other files, require files. (Silly and not necessarily work)
In routing, these pages are separated to different actions, which are similar to AdminController. Of course, the view supporting them must be separated.