We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use CodeIgniter\Controller; use App\Models\UserModel;
class Login extends Controller {
protected $helpers = ['html','form', 'url']; public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger) { parent::initController($request, $response, $logger); //-------------------------------------------------------------------- // Preload any models, libraries, etc, here. //-------------------------------------------------------------------- $this->session = Services::session(); $this->usermodel = new UserModel(); <-------------- this no found }
====================== Model Class Below ======================
namespace App\Models;
use CodeIgniter\Model;
class Usermodel extends Model {
protected $table = 'tbl_users'; public function __construct() { parent::__construct(); $db = \Config\Database::connect(); $bd = $db->table($this->table); }
}
In my localhost, it work good. But once i upload to server. It show Class 'App\Models\UserModel' not found Please help. Im new Codeigniter. Thanks
The text was updated successfully, but these errors were encountered:
your classname must be UserModel, not Usermodel. Please ask in forum instead for question.
Sorry, something went wrong.
Opsss, Thanks. You are awesome thanks.
No branches or pull requests
use CodeIgniter\Controller;
use App\Models\UserModel;
class Login extends Controller {
====================== Model Class Below ======================
namespace App\Models;
use CodeIgniter\Model;
class Usermodel extends Model {
}
In my localhost, it work good. But once i upload to server. It show
Class 'App\Models\UserModel' not found
Please help. Im new Codeigniter. Thanks
The text was updated successfully, but these errors were encountered: