PHPackages                             hamoda-dev/configure - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hamoda-dev/configure

ActiveLibaray[Utility &amp; Helpers](/categories/utility)

hamoda-dev/configure
====================

Configuration PHP Library

1.0(5y ago)6142PHP

Since Aug 3Pushed 5y ago1 watchersCompare

[ Source](https://github.com/hamoda-dev/configure)[ Packagist](https://packagist.org/packages/hamoda-dev/configure)[ RSS](/packages/hamoda-dev-configure/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

Hamoda-Dev/Configure
====================

[](#hamoda-devconfigure)

PHP Configuration library. Use to get all your app configuration from files for diffrent enviroment { development, prodection, ...} It's Easy to use just a few steps to done with it

installtion
-----------

[](#installtion)

install via composer :

```
composer require hamoda-dev/configure
```

Configurations
--------------

[](#configurations)

1 - copy this to your composer.json file

```
"scripts": {
        "configure-init": [
            "cp -r -d vendor/hamoda-dev/configure/sample/config config",
            "cp -r vendor/hamoda-dev/configure/sample/configure.json configure.json"
        ]
}

```

2 - run this command in your project to create config directory &amp; configure.json

```
    composer run-script configure-init
```

now you have config directory and configure.json

#### Config Directory

[](#config-directory)

containe to directory { development, production }

- inside development put your development configuration files
- inside production put your production configuration files

you can switch betwen the environments in the configure.json file

##### configure.json

[](#configurejson)

```
{
  "config_path" : "config",
  "environment" : "development"
}

```

in `"environment" : "here you switching environment"` =&gt; `develoment` or `production`

Syntax
------

[](#syntax)

```
