Dear, if you are going to create a large application, try placing each of your controllers and models in different folders and name all your controllers as home or indexes, and a different name for each folder
eg:
you have a controller for assets, so create a folder inside your application controller folder and name its assets, not inside these assets, create the controller name it home.php
class Home extends CI_Controller { function __construct() { parent::__construct(); } }
for models, you should use the name of the operations that your models perform for example, for the CRUD model, create something like this: crud_model
class Crud_model extends CI_Model { function __construct() { parent::__construct(); } }
for functions, you must give names of functions that are understandable and share each part with underscores, for example, if you have a function that receives the total number of users that you can write as follows:
function get_total_users() {} or for users function function users() { } for update, delete and insert the same way.
Mehdi jalal
source share