Need help in Controller |
[eluser]raiser[/eluser]
Dear Friends, How can i reduce the code in controller? That is, is there any way to include helper files and library files only once? Now i am including individually for each and every function. So kindly guide me to avoid this.. Here, the below code gives you an idea of what i am following the structure now... Code: class Events_awards extends CI_Controller{ Hope you can understand the code.. If any difficulty, let me know..
[eluser]toopay[/eluser]
You can put any helper/library loading statement into your constructor function, or if you use them in any controllers (or most of them) consider to autoload all that stuffs.
[eluser]raiser[/eluser]
Thanks toopay for replying.. Can you explain little bit clearly? I cant understand what you are suggesting.. I am a new bie to this CI..
[eluser]toopay[/eluser]
About loading library and helper at once in constructor, here you can do that... Code: class Events_awards extends CI_Controller{
[eluser]raiser[/eluser]
Thanks toopay.. It is working now.. I defined all files in autoload.php.. |
Welcome Guest, Not a member yet? Register Sign In |