app\Topic::patch PHP Method

patch() public method

public patch ( $properties )
    public function patch($properties)
    {
        foreach ($properties as $key => $value) {
            if (!in_array($key, $this->patchable)) {
                throw new Exception("Cannot patch {$key}");
            }
            $this->{$key} = $value;
        }
        $this->save();
    }