Welcome Guest, Not a member yet? Register   Sign In
Best practices for loading models in controllers in CI 4?
#2

Code:
use App\Models\SomeModel as SomeModel;
use App\Models\SomeotherModel as SomeotherModel;
    class Myclass extends Backendcontroller
    {

        public function __construct()
        {
            $this->someModel = new SomeModel();
            $this->someOtherModel = new SomeotherModel();
        }


use App\Models\SomeModel as SomeModel;
use App\Models\SomeotherModel as SomeotherModel;

Learning CI4 from my works, from errors and how to fix bugs in the community

Love CI & Thanks CI Teams

Reply


Messages In This Thread
RE: Best practices for loading models in controllers in CI 4? - by nc03061981 - 09-23-2020, 02:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB