benyi/laravel-more-macros

Provides more macros for illuminate/support or Laravel Macroble classes.

Installs: 9

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 1

pkg:composer/benyi/laravel-more-macros

v0.0.4 2020-06-11 08:25 UTC

This package is auto-updated.

Last update: 2025-10-09 00:34:19 UTC


README

Provides more macros for illuminate/support or Laravel Macroble classes.

Prerequisites

Installation

composer require benyi/laravel-more-macros

Methods

See bootstrap.php file listing.

/**
 * Check if an item is not exists in an array using "dot" notation.
 *
 * @param \ArrayAccess|array $array
 * @param string $key
 * @return array
 */
Illuminate\Support\Arr::absent($array, $key)


/**
 * "Un-dot" the flattened array into multi-dimensional structure.
 *
 * @param array $array
 * @return array
 */
Illuminate\Support\Arr::undot($array)


/**
 * Diff the collection with the given items (case insensitive)
 *
 * @param mixed $items
 * @return $this
 */
Illuminate\Support\Collection::diffCi($items)


/**
 * Determines if the given string is a valid DateTime format.
 *
 * @param string|null $time
 * @param \DateTimeZone|string|null $tz
 * @return bool
 */
Illuminate\Support\Carbon::recognized($time, $tz)


/**
 * Determines if the given string is not a valid DateTime format.
 *
 * @param string|null $time
 * @param \DateTimeZone|string|null $tz
 * @return bool
 */
Illuminate\Support\Carbon::unrecognized($time, $tz)