![]() |
using model disalowed in incomingrequest service? - 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: using model disalowed in incomingrequest service? (/showthread.php?tid=88795) |
using model disalowed in incomingrequest service? - webdeveloper - 11-08-2023 Hello, i literally cannot find out what's wrong with my custom incomingrequest service. Are the models disallowed here? After i remove line with $domainModel = new DomainModel(); everything works fine. Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes) in /var/www/admin/vendor/codeigniter4/framework/system/HTTP/IncomingRequest.php on line 169 Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes) in /var/www/admin/vendor/codeigniter4/framework/system/HTTP/IncomingRequest.php on line 169 app/Services/IncomingRequest.php PHP Code: <?php app/Config/Services.php PHP Code: <?php app/Models/DomainModel.php PHP Code: <?php RE: using model disalowed in incomingrequest service? - kenjis - 11-08-2023 (11-08-2023, 09:48 AM)webdeveloper Wrote: Hello, i literally cannot find out what's wrong with my custom incomingrequest service. Are the models disallowed here? No, but it is quite bad design. IncomingRequest should not know Models. I recommend you don't do like that. RE: using model disalowed in incomingrequest service? - webdeveloper - 11-09-2023 Evidently there is problem. In version 4.4.1 worked fine until 4.4.3. How dynamically load languages from database, so i can use them in filters? DomainModel did this for me on this place so i worked all over other places with custom supportedLangs. |