![]() |
Cant Load Model In Controller - 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: Cant Load Model In Controller (/showthread.php?tid=80272) Pages:
1
2
|
Cant Load Model In Controller - Nomie7 - 10-11-2021 Hi, I'm unable to load Model in the Controller I tried to follow the tutorials but don't know where I messed up or what am I doing wrong. RecordModel.php PHP Code: <?php PHP Code: <?php this is the error i get Code: Error RE: Cant Load Model In Controller - paulbalandan - 10-11-2021 Where did you save your RecordModel? RE: Cant Load Model In Controller - InsiteFX - 10-12-2021 Did you save with character case as the class name? They have to match character case. RE: Cant Load Model In Controller - Nomie7 - 10-12-2021 (10-11-2021, 07:33 PM)paulbalandan Wrote: Where did you save your RecordModel? app/models/RecordsModel.php InsiteFX Wrote:Did you save with character case as the class name? They have to match character case.yes you can see above in my code RE: Cant Load Model In Controller - includebeer - 10-12-2021 File permission? RE: Cant Load Model In Controller - ikesela - 10-12-2021 RecordsModel.php : rename to RecordModel.php to match class name and namespace RE: Cant Load Model In Controller - Kenneth Kipchumba - 10-12-2021 (10-12-2021, 04:52 AM)Nomie7 Wrote:(10-11-2021, 07:33 PM)paulbalandan Wrote: Where did you save your RecordModel? RE: Cant Load Model In Controller - Nomie7 - 10-13-2021 Ok we got that solved by changing the name. I'm new so please help me understand this error now. Here is code PHP Code: $record = new RecordsModel(); Here is the error Code: Error Im trying to follow the docs but dont how am i keep getting it wrong RE: Cant Load Model In Controller - includebeer - 10-13-2021 (10-13-2021, 05:11 AM)Nomie7 Wrote: Ok we got that solved by changing the name. I'm new so please help me understand this error now. Something must be wrong in your model (table name, column name, …) or in your database credentials in the configuration file because findAll() should work. Double check everything. RE: Cant Load Model In Controller - Nomie7 - 10-13-2021 check everything nothing is wrong checked, database name, table name, connection details and everything else. still the same. even make a new table new model file. |