App\Services\Setting\Setting::set PHP Метод

set() публичный Метод

IMPORTANT! : This function just change item at runtime. Saving change may call update function.
public set ( string $key = null, string $value = null )
$key string
$value string
    public function set($key = null, $value = null)
    {
        if (is_null($key)) {
            return;
        }
        if (is_array($key)) {
            foreach ($key as $k => $v) {
                self::set($k, $v);
            }
        } else {
            if (array_key_exists($key, $this->items) && $this->items[$key] !== $value) {
                $this->changed[$key] = $value;
            }
        }
    }