Welcome Guest, Not a member yet? Register   Sign In
CI 4 - beginner problems
#2

I guess you're kind of stuck with `load` object to initiate a library. This new CI4 is way better in my opinion to load library. You can load your library class by this

> Create a class under `app/Libraries`
> Make sure you are using namespace like this

PHP Code:
<?php
namespace App\Libraries
> Go to controller and load it by calling directly
PHP Code:
$this->libraryName = new App\Libraries\{ClassName}; 
That's it.

{The opinion is my own, this is not official}
Reply


Messages In This Thread
CI 4 - beginner problems - by boddah85 - 06-01-2020, 05:52 AM
RE: CI 4 - beginner problems - by fujael - 06-01-2020, 08:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB