![]() |
Where to put data logic not related with database? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Best Practices (https://forum.codeigniter.com/forumdisplay.php?fid=12) +--- Thread: Where to put data logic not related with database? (/showthread.php?tid=88053) |
Where to put data logic not related with database? - Muzikant - 07-12-2023 I am retrieving data from files (with library), then parsing it (with ?) and then saving parsed data into database (with model). I want this three steps separated. Where should I put parser? Models in CodeIgniter are binded with database tables ($table variable is mandatory) and libraries should be used for common things, not for a specific jobs. I was thinking models should be used for working with any data, not only for database related things. But binding models with tables confusing me. Thank you for your suggestions. RE: Where to put data logic not related with database? - ozornick - 07-12-2023 Create new layer in app/Services. Write some functional inside PHP Code: // app/Services/TextWriter.php |