Microweber\Install\DefaultOptionsInstaller::setCommentsEnabled PHP Method

setCommentsEnabled() public method

public setCommentsEnabled ( )
    public function setCommentsEnabled()
    {
        $existing = DB::table('options')->where('option_key', 'enable_comments')->where('option_group', 'comments')->first();
        if ($existing != false) {
            $option = Option::find($existing->id);
        } else {
            $option = new Option();
        }
        $option->option_key = 'enable_comments';
        $option->option_group = 'comments';
        $option->option_value = 'y';
        $option->save();
    }