ActiveRecord.php
public function listTypes($type)
    {
        $data = [];
        // create a reflection class to get constants
        $refl = new ReflectionClass(get_called_class());
        $constants = $refl->getConstants();

        foreach ($constants as $constantName => $constantValue) {

            // add prettified name to dropdown
            if (strpos($constantName, $type) === 0) {
                $prettyName = preg_replace('/' . $type . '/', "", $constantName, 1);
                $prettyName = Inflector::humanize(strtolower($prettyName));
                $data[$constantValue] = trim(ucwords($prettyName));
            }
        }

        return $data;
    }
public function listTypes($type)
    {
        $data = [];
        // create a reflection class to get constants
        $refl = new ReflectionClass(get_called_class());
        $constants = $refl->getConstants();

        foreach ($constants as $constantName => $constantValue) {

            // add prettified name to dropdown
            if (strpos($constantName, $type) === 0) {
                $prettyName = preg_replace('/' . $type . '/', "", $constantName, 1);
                $prettyName = Inflector::humanize(strtolower($prettyName));
                $data[$constantValue] = trim(ucwords($prettyName));
            }
        }

        return $data;
    }
Returns types available
@param $type
@return array