public function getByKey($key, $group = null) {
        $query =  $this->model
            ->where('key', $key);

        if(! is_null($group))
            $query->where('group', $group);

        return $query->get();
    }