Welcome Guest, Not a member yet? Register   Sign In
How to load personal config file in BaseController and have it available everywhere
#10

You can also do it like this using the config helper.

PHP Code:
<?php
    
// add to the top of your html view file.
    $myconfig config('MyConfig');
?>

<p>
    <!-- then call like this. -->
    <?= $myconfig->ada_site_name ?>
</p> 
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: How to load personal config file in BaseController and have it available everywhere - by InsiteFX - 02-14-2022, 02:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB