php - Should I name my actual controller files the same as my view files in Codeigniter? -


i'm writing first codeigniter site using mvc pattern. i'm building controllers load views (haven't gotten models yet) i'm noticing view , controller files have same filename (like products.php). in respective folders of course. example have controller, loads view, both of named about.php. have products controller loads products view both named products.php. practice?

from reading , studying seems names models differently, products_model.php, makes easy distinguish, can't recall seeing doing different controllers , views.

am setting myself headache down road when site develops more? thank you!

what when writing codeigniter sites creating folder same controller name in views

and if have method called index(), it'll view: /views/controller_name/index.php.

in controller can this: $this->load->view('controller_name/index'); can load file inside folder.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -