定制 aurion72/helpers 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

aurion72/helpers

最新稳定版本:v1.1.2

Composer 安装命令:

composer require aurion72/helpers

包简介

Aurion72 Helpers

关键字:

README 文档

README

Helpers is a general purpose package with some useful helper functions.

Usage

debug

rawSql($builder) : Return Raw SQL from Query Builder

loadingTimeStart(): Start counting loading time

loadingTimeEnd($die = true) : Save loading time

strings

boolToString($value, $true_string = null, $false_string = null, $locale = null) : Transform a value to a string.

boolToColorizedString($value, $true_string = null, $false_string = null, $locale = null) : Transform a value to a colorized string (BS4 style)

formatPrice($price, $currency_sign = ' €') : Turn a number into a currency formatted string

formatPercent($percent, $precision = 2, $percent_sign = true) : Turn a number into a percentage formatted string

randomPassword($length, $caps = false) : Generate a random password

media

rmdirRecursive($dir) : Recursively remove directories and files

stringToHexColor($string) : Convert a string to a color in hexadecimal format

numbers

randomBoolean($chance_of_true = 50) : Return a boolean with a random factor

addSign($value, $minus_only = false): Add a sign to a number

统计信息

  • 总下载量: 12.32k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-14