/** * @return string */ public static function tableName($withPrefix = true) { if (static::$_tableName) { return static::$_tableName; } $classInfo = new ReflectionClass(get_called_class()); return ($withPrefix ? static::connection()->prefix : '') . Inflector::pluralize(Inflector::tableize($classInfo->getShortName())); }