![]() |
Call to undefined method CodeIgniter\Shield\Models\UserModel::users_get_by_id - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Model-View-Controller (https://forum.codeigniter.com/forumdisplay.php?fid=10) +--- Thread: Call to undefined method CodeIgniter\Shield\Models\UserModel::users_get_by_id (/showthread.php?tid=92221) |
Call to undefined method CodeIgniter\Shield\Models\UserModel::users_get_by_id - 4usol - 12-25-2024 HI. i tried to create my first own modell and controller, in "Controller/My/Dashboard" " Code: namespace App\Controllers\My; in my model App/Models/UserModel.php Code: namespace App\Models; If i enter the "my/dashboard" page, i revieved this error: "Call to undefined method CodeIgniter\Shield\Models\UserModel::users_get_by_id " I wondering about the path, why "Shield"? In the NAmespaces of the Controller and the Modell i told "App" Path? What i do wrong? Sorry i find the problem, Shield has a model called "user Model", in my dashboard I called this "usersModel" instead of my own - I forgot the "s", that's all Now i have new problem: "Type of App\Models\UsersModel::$allowEmptyInserts must be bool (as in class CodeIgniter\BaseModel) " what it means? What i have to do? for them moment i comment out the line "$allowEmptyInserts" that all, but i think it will be better to understand what $allowEmptyInserts is for ;-) RE: Call to undefined method CodeIgniter\Shield\Models\UserModel::users_get_by_id - JustJohnQ - 12-25-2024 https://codeigniter4.github.io/userguide/models/model.html#allowemptyinserts |