master

laravel/framework

Last updated at: 29/12/2023 09:25

Config.php

TLDR

This file contains the Config class, which is a facade for managing the application configuration settings. It provides a convenient way to access and manipulate the configuration values.

Methods

has

Checks if a configuration key exists.

get

Retrieves the value of a configuration key. If the key is not found, a default value can be specified.

getMany

Retrieves the values of multiple configuration keys.

set

Sets the value of a configuration key. The key can be either an array or a string.

prepend

Prepends a value to a configuration key, which must be an array.

push

Pushes a value to a configuration key, which must be an array.

all

Retrieves all the configuration values.

macro

Registers a new macro on the Config facade.

mixin

Merges a mixin with the existing macros on the Config facade.

hasMacro

Checks if a macro is registered on the Config facade.

flushMacros

Removes all the registered macros on the Config facade.

Classes

There are no additional classes in this file.

<?php

namespace Illuminate\Support\Facades;

/**
 * @method static bool has(string $key)
 * @method static mixed get(array|string $key, mixed $default = null)
 * @method static array getMany(array $keys)
 * @method static void set(array|string $key, mixed $value = null)
 * @method static void prepend(string $key, mixed $value)
 * @method static void push(string $key, mixed $value)
 * @method static array all()
 * @method static void macro(string $name, object|callable $macro)
 * @method static void mixin(object $mixin, bool $replace = true)
 * @method static bool hasMacro(string $name)
 * @method static void flushMacros()
 *
 * @see \Illuminate\Config\Repository
 */
class Config extends Facade
{
    /**
     * Get the registered name of the component.
     *
     * @return string
     */
    protected static function getFacadeAccessor()
    {
        return 'config';
    }
}