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.
11
11
Accessing Config Files
12
12
======================
13
13
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
15
15
are public, so you access the settings like any other property::
16
16
17
+ // Creating new class by hand
17
18
$config = new \Config\EmailConfig();
18
19
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
+
19
26
// Access settings as class properties
20
27
$protocol = $config->protocol;
21
28
$mailpath = $config->mailpath;
You can’t perform that action at this time.
0 commit comments