Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 63 | All time: 10,429 This week: 571 |
Version | License | PHP version | Categories | |||
environment 1.0 | MIT/X Consortium ... | 5 | PHP 5, Configuration |
This is a environment library for quick environment setup. Forked from ahirarge/environment
To install through composer, simply put the following in your composer.json
file:
{
"require": {
"frdl/environment": "*",
}
}
index.php
$environment = new Frdlweb\Environment\Environment;
$environment->path('/')
->detectEnvironment([
'local' =>[
'required' => true,
'hosts' => ['your-machine-name']
]
]);
index.php
$environment = new Frdlweb\Environment\Environment;
$environment->dir('/home/')
->detectEnvironment([
'local' =>[
'required' => false,
'hosts' => ['your-machine-name']
]
]);
> You can check your machine name with hostname
command.
.env.local.php
return [
'secret-password' => 'secret-password-value'
];
.env.local.json
{
"environment": "development"
}
$secret = getenv('secret-password');
If you wish, you can use environment library with facade connector. Please visit for guideline. ahir/facades
MIT
Files (3) |
File | Role | Description | ||
---|---|---|---|---|
src (1 directory) | ||||
composer.json | Data | Auxiliary data | ||
readme.md | Doc. | Documentation |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.