Welcome Guest, Not a member yet? Register   Sign In
How to Access Config File Variables Globally in all Views ?
#3
Thumbs Up 

(11-27-2019, 04:52 AM)MGatner Wrote: Anything you load in BaseController will be available in all the controllers that extend it. There is also the helper function “config()” which not only fetches a config but can use it immediately, e.g.:

<a href=“https://google.com/maps?key=<?= config(‘SiteConfig’)->googleMapsApiKey ?>”>Click</a>

This is exactly what am looking for. Thank You so much.   Smile
Reply


Messages In This Thread
RE: How to Access Config File Variables Globally in all Views ? - by midhunlalkc - 11-27-2019, 07:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB