![]() |
"Class 'App\Models\UserModel' not found" - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: "Class 'App\Models\UserModel' not found" (/showthread.php?tid=78715) |
"Class 'App\Models\UserModel' not found" - pyromanci - 03-01-2021 Ok, So this is my first venture into CI4. I have been using CI3 with a customized dynamic crud based system for all my models. I decided to try the built in models and entities. So I created my base model in /app/Models/UserModel.php PHP Code: <? Then inside the auth library I'm writing. I get the error "Class 'App\Models\UserModel' not found" PHP Code: <?php So i'm alittle confused as to why it's not working. RE: "Class 'App\Models\UserModel' not found" - kenjis - 03-01-2021 PHP Code: <? RE: "Class 'App\Models\UserModel' not found" - wdeda - 03-01-2021 use App\Models\UserModel; must be defined before class Auth { PHP Code: <?php RE: "Class 'App\Models\UserModel' not found" - pyromanci - 03-02-2021 (03-01-2021, 05:03 PM)kenjis Wrote:I didn't even notice that. Normally I have short_open_tag turn on cause I'm stuck maintaining super old scripts. So that didn't even register to me at first. Checked the php config and it was turned off. |