elfsundae / laravel-helper
1.3.1
2017-10-10 11:02 UTC
Requires
- php: >=5.6.4
- elfsundae/urlsafe-base64: ~1.1
- illuminate/support: 5.*
Requires (Dev)
- mockery/mockery: 0.9.*
- phpunit/phpunit: ~5.7
This package is not auto-updated.
Last update: 2022-02-01 13:07:47 UTC
README
安装
您可以通过 Composer 管理器安装此包
$ composer require elfsundae/laravel-helper
可用的全局函数
函数 | 描述 |
---|---|
urlsafe_base64_encode($data) |
URL安全的 base64_encode |
urlsafe_base64_decode($data, $strict = false) |
URL安全的 base64_decode |
mb_trim($string) |
带有 mbstring 支持的 trim |
string_value($value, $jsonOptions = 0) |
将任何类型转换为字符串 |
in_arrayi($needle, $haystack) |
不区分大小写的 in_array |
active() |
如果当前请求 URI 与给定的模式匹配,则返回字符串 'active' |
asset_from($root, $path = '', $secure = null) |
从自定义根域名(如 CDN 等)生成资产的 URL |
测试
$ composer test
许可证
此包是开源软件,采用 MIT 许可证 许可。