Recommend this page to a friend! |
Download .zip |
Info | Documentation | View files (3) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2022-07-27 (9 days ago) | Not yet rated by the users | Total: 35 This week: 7 | All time: 10,513 This week: 32 |
Version | License | PHP version | Categories | |||
environment 1.0 | MIT/X Consortium ... | 5 | PHP 5, Configuration |
Description | Author | |||
This package can detect the current PHP environment variables. Innovation Award
|
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 |
File | Role | Description | ||
---|---|---|---|---|
src (1 directory) | ||||
composer.json | Data | Auxiliary data | ||
readme.md | Doc. | Documentation |
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.