Download the PHP package emrul1875/laravel-extra-collection without Composer

On this page you can find all versions of the php package emrul1875/laravel-extra-collection. 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-extra-collection

Laravel Extra Collection

This is a package of Laravel Collection which can be used with laravel existing collection. You are welcome to give new idea or contribute in repository. Let's make our lives much more easier.

Installation

You can install the package via composer:

Usage

The package is auto-discovered!

Add the service provider to config/app.php

Collections

prependValue

The prependValue() method receive 3 parameter. First 2 parameter is mandatory and 3rd parameter is optional.First parameter receive an array or string. If your collection is sequential array you can pass string as a first parameter otherwise pass an array. The array should contain key and value pair where key will be the property name of collection which should be changed and value should be the text that needs to prepend with value. You can pass true or false in thrid parameter. By default it is false. If you pass true it will skip all property which has null value.

appendValue

The appendValue() method receive 3 parameter. First 2 parameter is mandatory and 3rd parameter is optional. First parameter receive an array or string. If your collection is sequential array you can pass string as a first parameter otherwise pass an array. The array should contain key and value pair where key will be the property name of collection which should be changed and value should be the text value that needs to append with value. You can pass true or false in thrid parameter. By default it is false. If you pass true it will skip all property which has null value.

concatValue

The concatValue() method receive 3 parameter. First 2 parameter is mandatory and 3rd parameter is optional.First parameter receive new property name that should be added in the collection. Second parameter receivesarray of field name which exist in collection. Third parameter receives delimiter (comma , or space ' ').

at

The at() method takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.

find

The find() method returns the value of the first element in the provided array that satisfies the provided testing function. If no values satisfy the testing function, null is returned.

findIndex

The findIndex() method returns the index of the first element in the array that satisfies the provided testing function. Otherwise, it returns -1, indicating that no element passed the test.

MIT


All versions of laravel-extra-collection with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
illuminate/support Version ^8.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 emrul1875/laravel-extra-collection contains the following files

Loading the files please wait ....