0

I am using codeigniter framework latest version, when i call the function $model->findAll(); it gives me error like below and my operating system is Ubuntu 19.10, if this error is because of operating system than please let me know how to solve that

enter image description here

Here is my code

<?php

namespace App\Controllers;

// ini_set('display_errors', 1);
// ini_set('display_startup_errors', 1);
// error_reporting(E_ALL);

use CodeIgniter\RESTful\ResourceController;
use App\Models\Users as CodeIgniterUsers;

class Auth extends ResourceController
{
    public function login()
    {
        $model = new CodeIgniterUsers();
        return $model->findAll();
    }

    public function register()
    { }
}

1 Answers1

-2

Maybe App\Models\User is not in the namespace yet.

  • tghis does not help the original author solving his problems, can you explain in more detail what you mena by this statement ? – monofone Mar 20 '20 at 06:00
  • Check @Boominathan Elango's comment. Asking for the `UsersModel`, because maybe the `UsersModel` doesn't have `namespace`. – Razzell Mar 26 '20 at 23:05