CodeIgniter - Call to a member function model() on a non-object [duplicate] CodeIgniter - Call to a member function model() on a non-object [duplicate] codeigniter codeigniter

CodeIgniter - Call to a member function model() on a non-object [duplicate]


You don't have a constructor, in your login controller:

public function __construct() {            parent::__construct();}


According to CodeIgniter docs

If you intend to use a constructor in any of your Controllers, you MUST place the following line of code in it: parent::__construct();

Refer CI Constructor for more.