Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Config Laravel Package

league/config

Define and validate nested PHP configuration with strict schemas (via Nette Schema). Merge multiple config sources, apply defaults, enforce types/constraints, and read values using convenient dot notation. Ideal for robust, structured app and library config.

View on GitHub
Deep Wiki
Context7

layout: default title: Mutability description: When/how to update schemas and config values, and how to prevent others from doing so

Mutability

Thanks to lazy processing, you can define schemas and set user-provided values at any time and in any order. This can be very convenient in many cases, but you might have times where you'd like to provide a read-only version of the Configuration to ensure nobody else can modify it.

Read-Only Reader

To do this, simply call $config->reader(). This will return an object that only has the get() and exists() methods, preventing others from further modifying the configuration:

use League\Config\Configuration;

$config = new Configuration([/* ... */]);

$someOtherObject->setConfig($config->reader());

Because both the reader and the main Configuration implement ConfigurationInterface, you can type-hint against that anywhere you need to retrieve values but not necessarily modify things.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
croct/coding-standard
croct/plug-php
nqxcode/phpmorphy
boundwize/pyrameter
testo/facade
develia/commons
dmstr/symfony-system-resources-bundle
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
renatomarinho/laravel-page-speed
develia/geo-bundle
austinheap/laravel-database-encryption
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
imbo/imbo-coding-standard
visualbuilder/filament-lottie
servicioslineaonce/starter-kit
atomcoder/laravel-reorderable
irajul/filament-shadcn-theme