{
"require": {
"artox-lab/json-config": "1.3.1"
}
}
Run composer update
config.json
{
"name": "Suppa Project",
"version": 1,
"rating": 2.5,
"authors": [
"[email protected]"
],
"emails": {
"subscription": [
"[email protected]",
"[email protected]"
],
"user": {
"name": "Johny"
},
"should_notify": true
}
}
index.php
<?php
include 'vendor/autoload.php';
// Setup path to config file
JsonConfig\Config::setup('config.json');
// Get data from config
$subscriptions = JsonConfig\Config::get('emails.subscription');