dev-master
9999999-devA Laravel Package
MIT
The Requires
- php ^7.1
- illuminate/support ~5.5.0|~5.6.0
The Development Requires
1.0.0
1.0.0.0A Laravel Package
MIT
The Requires
- php ^7.1
- illuminate/support ~5.5.0|~5.6.0
The Development Requires
Wallogit.com
2017 © Pedro Peláez
A Laravel Package
This package provides some additional functions that can be used with Laravel's Collection., (*1)
This package requires PHP in>= 7.2 and Laravel in >= 5.7., (*2)
You can install the package via composer:, (*3)
composer require aheenam/laravel-collection-addon
This package comes with following additional methods for Laravel collections, (*4)
containsAll($subset)This method returns true if the collection contains all elements of the given $subset., (*5)
<?php // returns true collect([1,2,3])->containsAll([1,2]); // returns false collect([1,2,3])->containsAll([1,4]);
containsAny($subset)This method returns true if the collection contains any of the elements given in $subset, (*6)
<?php // returns true collect([1,2,3])->containsAny([1,4]); // returns false collect([1,2,3])->containsAny([4,5]);
hasAll($subset)This method checks if all the given keys in $subset are present in the collection., (*7)
<?php // returns true collect(['name' => 'john doe', 'nickname' => 'jd', 'age' => 32])->hasAny(['name', 'nickname']); // returns false collect(['name' => 'john doe', 'age' => 32])->hasAny(['name', 'firstName', 'lastName']); // returns false collect(['nickname' => 'jd', 'age' => 32])->hasAny(['name', 'firstName', 'lastName']);
hasAny($subset)This method checks if any of the given keys in $subset exist in the collection., (*8)
<?php // returns true collect(['name' => 'john doe', 'age' => 32])->hasAny(['name', 'firstName', 'lastName']); // returns false collect(['nickname' => 'jd', 'age' => 32])->hasAny(['name', 'firstName', 'lastName']);
Check CHANGELOG for the changelog, (*9)
To run tests use, (*10)
$ composer test
If you discover any security related issues, please email rathes@aheenam.com or use the issue tracker of GitHub., (*11)
Aheenam is a small company from NRW, Germany creating custom digital solutions. Visit our website to find out more about us., (*12)
The MIT License (MIT). Please see License File for more information., (*13)
A Laravel Package
MIT
A Laravel Package
MIT