定制 slowlyo/laravel-support 二次开发

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

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

slowlyo/laravel-support

最新稳定版本:v0.0.7

Composer 安装命令:

composer require slowlyo/laravel-support

包简介

php/laravel部分代码封装

README 文档

README

php/laravel部分代码封装

安装

composer require slowlyo/laravel-support

Macro

  • findInSet
    • 查询支持 find_in_set
  • toRawSql
    • 输出拼接了参数的原始sql

trait

  • MakeTrait
    • 更方便的调用非静态方法
  • MysqlLoadDataTrait
    • 使用 mysql 的 load data 语句批量插入数据

Functions

// functions start

// 获取当前域名
function domain()

// 可以传入 0 的 bcdiv
function safe_bc_dev($dividend, $divisor, $scale = 2)

// 计算数组的和
function bc_array_sum($array, $scale = 2)

// 可传入数组的 explode
function safe_explode($delimiter, $string)

// 返回前后拼接了 % 的字符串
function like($str)

// 是否是json字符串
function is_json($string)

// 获取表字段
function table_columns($tableName)

// 一行行读取文件
function file_to_line($path)

// html 转 string
function html_to_string($content)

// 获取 sql 执行记录
function sql_record()

// 创建目录
function make_dir($path, $mode = 0777, $recursive = true, $context = null)

// 抽奖
function lottery($probs)

// functions end

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-02-22