mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
+ add namespace example
Signed-off-by: Christoph Potas <christoph286@googlemail.com>
This commit is contained in:
parent
609960db48
commit
cc45b5a1cb
@ -23,6 +23,9 @@ are public, so you access the settings like any other property::
|
||||
// Get shared instance with config function
|
||||
$config = config( 'EmailConfig' );
|
||||
|
||||
// Access config class with namespace
|
||||
$config = config( 'Config\\EmailConfig' );
|
||||
|
||||
// Access settings as class properties
|
||||
$protocol = $config->protocol;
|
||||
$mailpath = $config->mailpath;
|
||||
|
Loading…
x
Reference in New Issue
Block a user