Skip to content

Core\Config

Fariz Luqman edited this page Jul 11, 2016 · 1 revision

The Configuration loader are responsible to read and return the configurations in a form of array.

Creating Configuration File

You need to create a .php file in the config directory, for example, the env.php (Environment Variables configurations):

<?php
return [
    'DEBUG' => 1,
    'SHOW_EXECUTION_TIME' => true
];

Accessing Configurations

The configuration loader can access configuration files in the config directory easily:

$config = Config::get('env');

echo($config['DEBUG']); //returns 1

Visit our website for tutorials: stupidlysimple.github.io

Clone this wiki locally