CI4: class not found error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: CI4: class not found error (/showthread.php?tid=81670) |
CI4: class not found error - Ahmed Haroon - 04-07-2022 following video guide at Video Guide after initial custom error handling, he is going to Insert records in database, start at around 25:50 the code i wrote during following above mentioned guide is as below: Code: if (!$validation){ when run, mine is showing error (below are 2 screenshots in 1 to check error and UserModel file and class): please help, definitely i missed or overlooked something or made mistake due to my lack of knowledge. regards it resolved... just for juniors like me: the mistake was in file name UsersModel , i overlooked .php extension. now it is inserting data. regards RE: CI4: class not found error - captain-sensible - 04-07-2022 Generally with namespacing etc and correct location of your models , declaring in controller something like: Code: use \App\Models\UsersModel; code works so that you only have to do something along the lines of : Code: $handleName = new UsersModel(); RE: CI4: class not found error - Ahmed Haroon - 04-07-2022 (04-07-2022, 01:50 AM)captain-sensible Wrote: Generally with namespacing etc and correct location of your models , declaring in controller something like:thanks @captain-sensible for great help to understand it, i am newly entered in this CI world! regards. |