Unable to connect to database. |
HI,
I am having a problem creating a model and using it in my controller. I am receiving the following error when trying to do so. Quote:APP\Models\loginModel::__construct(): Argument #1 must be of type Codeigniter\Database\ConnectionInterface, Here is the code that I am using for my model and controller. Code: <?php Code: <?php Can you guys help me to fix the issue that I am facing?
That is strange, because Codeigniter\Database\MySQLI\Connection implements Codeigniter\Database\ConnectionInterface.
You Posted this:
PHP Code: use CodeIniter\Database\ConnectionInterface; It has a typo and should be: PHP Code: use CodeIgniter\Database\ConnectionInterface; Typo in your post or in your code? |
Welcome Guest, Not a member yet? Register Sign In |