• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I can i declare Thirdparty Library globally

#1
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
Reply

#2
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 )
Reply

#3
Solved using service and helper Smile
Reply

#4
(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
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.