Welcome Guest, Not a member yet? Register   Sign In
I can i declare Thirdparty Library globally

I can i declare Library globally

 $this->ionAuth    = new \IonAuth\Libraries\IonAuth();
i want to access $this->ionAuth from anywhere. So how can i declare this globally so that i can access $this->ionAuth form Models, View , and Controller

This would be a good idea to use a service.

CodeIgniter 4 User Guide - Services
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

Solved using service and helper Smile

(03-04-2020, 02:40 AM)samyam Wrote: Solved using service and helper Smile
you are right but i dind like the way declearing
auth() as function

Theme © iAndrew 2016 - Forum software by © MyBB