PHPackages                             luracast/config - 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. luracast/config

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

luracast/config
===============

lazy load configuration data from php files returning associative arrays

2.0.2(4y ago)10161.2k↑42.7%3[1 issues](https://github.com/Luracast/Config/issues)1LGPL-2.0-onlyPHPPHP &gt;=5.5

Since Jul 13Pushed 4y ago2 watchersCompare

[ Source](https://github.com/Luracast/Config)[ Packagist](https://packagist.org/packages/luracast/config)[ RSS](/packages/luracast-config/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (1)

Config
======

[](#config)

[![Latest Stable Version](https://camo.githubusercontent.com/98dfe7f7e32a6ed7abd86b81fbdd06b1c5c9fee206fd61d2d39aec2bf1559998/68747470733a2f2f706f7365722e707567782e6f72672f6c757261636173742f636f6e6669672f762f737461626c652e706e67)](https://packagist.org/packages/luracast/config)[![Total Downloads](https://camo.githubusercontent.com/bb0baa31cbb8d984263f9f204956674dfe55a076fc981cf41c9a294e6658706d/68747470733a2f2f706f7365722e707567782e6f72672f6c757261636173742f636f6e6669672f646f776e6c6f6164732e706e67)](https://packagist.org/packages/luracast/config)[![Latest Unstable Version](https://camo.githubusercontent.com/80f93dbb125a8df02edb6dbfad79b45d2ac1e9610c526233feb44c2defd970cb/68747470733a2f2f706f7365722e707567782e6f72672f6c757261636173742f636f6e6669672f762f756e737461626c652e706e67)](https://packagist.org/packages/luracast/config)[![License](https://camo.githubusercontent.com/b0596159f49a9d590b08ac6792e464061269038b6f0f0dd80b94cc34349095b0/68747470733a2f2f706f7365722e707567782e6f72672f6c757261636173742f636f6e6669672f6c6963656e73652e706e67)](https://packagist.org/packages/luracast/config)[![Build Status](https://camo.githubusercontent.com/5b19ece25d0d99724c09d831f2e048bc17bfc2cc7ebb1ddd510478c1e92e2b17/68747470733a2f2f7472617669732d63692e6f72672f4c757261636173742f436f6e6669672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Luracast/Config)

Config class for loading configuration arrays from various files and provide easy access to nested properties with dot syntax

Lazy loads configuration information when requested using `Config::get('file.property','default_value')` or `$config['file.property']`

For example :-

```
Config::get('database.connections.sqlite', [])

```

will load `database.php` which returns an array that contains connections property which contains the sqlite property value of which will be returned. `$path` given in the constructor is the path it will look for the file. If file does not exist or the property does not exist, then the default value (set by the second parameter) will be returned.

If there is no default value, null will be returned.

When an environment string is specified, it will look for a folder with that name inside the path and use the returned array to override the properties is original config file thus allowing some customization

Setting A Configuration Value
-----------------------------

[](#setting-a-configuration-value)

Notice that "dot" style syntax may be used to access values in the various files. You may also set configuration values at run-time:

```
Config::set('database.default', 'sqlite');

```

Configuration values that are set at run-time are only set for the current request, and will not be carried over to subsequent requests.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community12

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~689 days

Total

5

Last Release

1570d ago

Major Versions

1.0.1 → 2.0.02016-05-18

PHP version history (2 changes)1.0.0PHP &gt;=5.3.0

2.0.2PHP &gt;=5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/37124632bba55e8e9ae652c5d9fccf4779059a7693a8cce0eaee854b281c351c?d=identicon)[Arul](/maintainers/Arul)

---

Top Contributors

[![Arul-](https://avatars.githubusercontent.com/u/2255137?v=4)](https://github.com/Arul- "Arul- (16 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/luracast-config/health.svg)

```
[![Health](https://phpackages.com/badges/luracast-config/health.svg)](https://phpackages.com/packages/luracast-config)
```

###  Alternatives

[jdare/clank-bundle

Symfony ClankBundle

130981.4k1](/packages/jdare-clank-bundle)[diego-ninja/laravel-devices

This package provides session tracking functionalities, multi-session management and user device management features for laravel applications.

763.1k2](/packages/diego-ninja-laravel-devices)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
