Skip to content

Latest commit

 

History

History
34 lines (20 loc) · 847 Bytes

config.md

File metadata and controls

34 lines (20 loc) · 847 Bytes

Runtime Configuration

Contents

The Basics

Sometimes you may need to get and set configuration options at runtime. It's a breeze using the Config class, which utilizes convenient "dot" syntax for accessing configuration files and items.

Retrieving Options

Retrieve a configuration option:

$value = Config::get('application.url');

Return a default value if the option doesn't exist:

$value = Config::get('application.timezone', 'UTC');

Retrieve an entire configuration array:

$options = Config::get('database');

Setting Options

Set a configuration option:

Config::set('cache.driver', 'apc');