Welcome Guest, Not a member yet? Register   Sign In
Custom Classes : general questions
#5

(This post was last modified: 06-23-2020, 12:10 PM by jreklund.)

1 - What do you think about creating a class that I can use in many Models, Views and Controllers ?
- If it's an all in one application, that allows you to modify all the tables in the database, I would make it a "Code Module" that you can drop in place in any application you make.
https://codeigniter.com/user_guide/general/modules.html

2 - Where should I put this class "for a good practice" and call it if I would like to use it with several controllers, models and views ?
- If it's a normal application, not a database manager you generally create one controller, one module and one view for everything.
-- Adding a page
-- Adding news
...

A single controller, model or view don't generally handle everything. Sure you can do it, but that's not normally something you do.

3 - And last question : Does something already exists like that ? ... A plugin in CodeIgniter4 for adding quickly content in databases ?
- There are a beta of Grocery CRUD, if that's what you are after: https://www.grocerycrud.com/
Reply


Messages In This Thread
Custom Classes : general questions - by kilden - 06-23-2020, 05:38 AM
RE: Custom Classes : general questions - by jreklund - 06-23-2020, 12:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB