Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter 4.0 is here!

(09-01-2021, 04:59 AM)Anton_BNV Wrote: I'm current migrating from CI 3 to CI4.
How to access my Libraries methods from a Models ? A lot of doc i'had read just show how to access it from a Controller.

Any advices please ?

Sorry for my bad english.

In CI4 there's no difference accessing your library from a controller or a model. You just load it and use it. 

PHP Code:
use App\Libraries\MyLib;
// ....
$myLib = new MyLib(); 
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/

very usefull tnx

amazing work
| deluxekala |

Theme © iAndrew 2016 - Forum software by © MyBB