🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# LaraCMS 扩展的自定义函数 ## byte_to_size 字节显示单位转换 参数:[ int ] byte 字节大小 ## storage_url 生成文件可访问路径 参数:[ string ] path 文件相对路径 ## storage_image_url 生成图片可访问路径,当图片不存在时,返回默认图 参数:[ string ] path 文件相对路径 ## storage_video_url 生成图片缩略图路径,当图片不存在时,返回默认视频图 参数:[ string ] path 文件相对路径 ## route_class 根据路由生成 class 参数:无 ## response_ajax 预定义的一个简单响应结构 参数:[ int ] code 自定义错误码 参数:[ string ] message 提示消息 参数:[ array ] data 返回数据 ## previous_url 获取上一次请求完整的 url 并 urlencode 参数:无 ## create_object_id 生成 object_id 参数:无 ## get_value 安全的获取 对象/数组 的值 参数:[ object | array ] arr_or_obj 待获取的数据对象 参数:[ string ] key_or_prop 要获取的键值 参数:[ string | int | array | object ] else 默认返回 ## make_excerpt 生成摘录 参数:[ string ] value 内容 参数:[ int ] length 要生成摘录的长度,默认:200 ## is_json 检查字符串是否为 `json` 字符串 参数:[ string ] string 待检查的字符串 ## frontend_navigation 获取前台导航(过滤隐藏) 参数:[ string ] category 导航类型。默认: desktop ## breadcrumb 获取面包屑数据 参数:无 ## get_block 获取区块数据 参数:[ string ] object_id 区块唯一标识 ## is_mobile 判断是否为手机端 参数:无 ## laravel_log laravel 日志记录 参数:[ string ] type 类型 参数:[ string ] description 记录内容 参数:[ string ] model 模型内容 ## jobs_log 任务日志记录 参数:[ string ] description 记录内容 参数:[ string ] model 模型内容 ## queue_log 队列日志记录 参数:[ string ] description 记录内容 参数:[ string ] model 模型内容 ## behavior_log 行为日志记录 参数:[ string ] description 记录内容 参数:[ string ] model 模型内容 ## business_log 业务日志记录 参数:[ string ] description 记录内容 参数:[ string ] model 模型内容