File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
user_guide_src/source/general Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,18 @@ create an instance of the class and all your settings are there for you.
1111Accessing Config Files
1212======================
1313
14- You can access config files within your classes by creating a new instance. All of the properties
14+ You can access config files within your classes by creating a new instance or using the config function . All of the properties
1515are public, so you access the settings like any other property::
1616
17+ // Creating new class by hand
1718 $config = new \Config\EmailConfig();
1819
20+ // Creating new class with config function
21+ $config = config( 'EmailConfig', false );
22+
23+ // Get shared instance with config function
24+ $config = config( 'EmailConfig' );
25+
1926 // Access settings as class properties
2027 $protocol = $config->protocol;
2128 $mailpath = $config->mailpath;
You can’t perform that action at this time.
0 commit comments