Download the PHP package t-labs-co/laravel-array-macros without Composer

On this page you can find all versions of the php package t-labs-co/laravel-array-macros. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-array-macros

Laravel Array Macros

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

The Laravel Array Macros package provides a collection of useful macros for Laravel's Arr helper, extending its functionality to simplify common array operations. These macros are designed to make working with arrays in Laravel more efficient and expressive, reducing boilerplate code and improving readability.

Why Use This Package?

This package is ideal for developers who frequently work with arrays in Laravel and want to simplify their code. It provides a wide range of macros that cover common use cases, making array manipulation more intuitive and concise.

Contact Us

(c) T.Labs & Co. Contact for Work: T. [email protected]

Got a PHP or Laravel project? We're your go-to team! We can help you:

Features

Installation

You can install the package via composer:

Usage

firstIf

Returns the first element of an array if a condition is met.

lastIf

Returns the last element of an array if a condition is met.

chunk

Splits an array into chunks and applies a callback to each chunk.

getAnyValues

Retrieves the first matching value from an array based on a list of keys.

hasAnyValues

Checks if any of the specified values exist in an array.

hasAllValues

Checks if all specified values exist in an array.

ifOk

Returns the array if a condition is met, otherwise returns null.

missing

Returns a list of keys that are missing from an array.

isMissing

Checks if a key is missing from an array.

range

Creates a range of numbers with optional steps.

renameKeys

Renames keys in an array based on a mapping.

swap

Swaps the values of two keys in an array.

validate

Validates all items in an array using a rule or callable.

isNumeric

Checks if all items in an array are numeric. Supports strict mode to ensure only integers and floats are considered numeric.

odd

Filters an array to include only odd numbers. Supports optional sorting in ascending, descending, or no order.

even

Filters an array to include only even numbers. Supports optional sorting in ascending, descending, or no order.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-array-macros with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4||^8.3||^8.2
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0||^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package t-labs-co/laravel-array-macros contains the following files

Loading the files please wait ....