[eluser]Jagar[/eluser]
Hi everyone,
I'm currently working on a project for work that uses smarty, CI (of course).
In my admin section I have few tables that I need to edit/delete/and list, I have done two of the tables, but it seem that i"m repeating myself, and copying and pasting the code and doing little changes.
In my controller, I have a folder called admin where all the restricted code are listed, and in the admin folder I have files like
setting_province.php
setting_province_add.php
setting_province_edit.php
also
setting_eventtype.php
setting_eventtype_add.php
and so on,
this will be the same for 7 other tables.
I'm pretty sure there must be a better way to do this, but can't think of anything.
Also in my views folder, I have:
[Admin]
--[settings]
----[provinces]
-------add.htm
-------edit.htm
-------index.htm
-----[eventtype]
-------add.htm
-------edit.htm
-------index.htm
If anyone knows a better way to do this, please let me know.
Thanks