protected function getResourceName($name, $format = true)
    {
        // we assume its already formatted to resource name
        if ($name && $format === false) {
            return $name;
        }

        $name = isset($name) ? $name : $this->resource;

        $this->resource = lcfirst(str_singular(class_basename($name)));
        $this->resourceLowerCase = strtolower($name);

        return $this->resource;
    }