function human_file_size($size) { if ($size >= 1073741824) { $fileSize = round($size / 1024 / 1024 / 1024, 1) . ' ГБ'; } elseif ($size >= 1048576) { $fileSize = round($size / 1024 / 1024, 1) . ' МБ'; } elseif ($size >= 1024) { $fileSize = round($size / 1024, 1) . ' КБ'; } else { $fileSize = \Larakit\Helper\HelperText::plural($size, 'байт', 'байта', 'байтов'); } return $fileSize; }
static function getEntityNamePlural($cnt) { return HelperText::plural($cnt, static::translate('plurals.1'), static::translate('plurals.2'), static::translate('plurals.5'), static::translate('plurals.0')); }