定制 ifresh/collection-macros 二次开发

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

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

ifresh/collection-macros

Composer 安装命令:

composer require ifresh/collection-macros

包简介

A collection of various useful additions to the Laravel collection class

README 文档

README

iFresh Laravel Collection helpers

Description

This package contains a set of (silly) Laravel Collection macros. You probably won't need them. Or maybe you do, I don't know, you do you.

Provided methods

Numbers

Macro methods that are intended for working with collections that contain only numbers.

greaterThan

Returns a set of numbers that are larger than the provided minimum value. Non-inclusive.

// [3, 4]
collect([1, 2, 3, 4])->greaterThan(2); 

lessThan

Returns a set of numbers that are smaller than the provided maximum value. Non-inclusive.

// [1, 2]
collect([1, 2, 3, 4])->lessThan(3); 

multiply

Returns the result that is gotten by multiplying all the numbers in the collection together.

// 6 (1 * 2 * 3)
collect([1, 2, 3])->multiply();

Strings

Macro methods that are intended for working with collections that contain only strings.

toLower

Convert all the strings in the collection to their lowercase value.

// ['a', 'b', 'c']
collect(['A', 'B', 'C'])->toLower();

toUpper

Convert all the strings in the collection to their uppercase value.

// ['A', 'B', 'C']
collect(['a', 'b', 'c'])->toUpper();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2022-03-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固