[eluser]Dileep[/eluser]
Hello ,
I am thinking about to create a Codeigniter Library to my existing project,so that other developers [upcoming developers] can use it very effectively.
Currently i have Controllers and Models on my existing Project.
In example take the login
I have a function to login and a function in my model class for login.
how can i join both controller and models on my new library so that i can create the library
ex :
Code:
class Test extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->library('project_library'); //custom library
}
function Login{
$this->project_library->login(*paramenters*);
}
}
I need a format like this,is it a good idea to write code for Controllers for database operation rather than models ??
Or how can i achieve this in a better way ?
All Opinions and suggestions are welcomed.
Please reply
Thank you.