Package

Tightenco Collect

Collect - Illuminate Collections as a separate package.

Package

tightenco/collect

View on GitHub →

Collect - Illuminate Collections by Tighten

Overview

Collect is a Laravel package developed by Tighten Co. that allows you to integrate Laravel's Collections into non-Laravel PHP projects with ease. It provides the essential functionality of Laravel's Illuminate\Support\Collection class without requiring the entire Illuminate\Support package. This makes it lightweight and perfect for projects needing advanced collection operations outside of the Laravel ecosystem.

Main Features

  • Lightweight Integration: Use Laravel's Collections without the need for the entire Laravel support package.
  • Automatic Updates: Stays in sync with Laravel's Collections, ensuring consistency and reliability.
  • Developer Friendly: Includes an upgrade script for easy updates to mirror new Laravel releases.

Installation

Use Composer to install Collect in your project:

composer require tightenco/collect

Usage

Primarily, Collect is used in the same way as Laravel's Collections. Once installed, it can be utilized to leverage advanced collection methods in non-Laravel PHP applications.

Development and Testing

  • Upgrading: To upgrade Collect to a new version of Laravel's Collections, use the provided upgrade script:

    ./upgrade.sh  # Automatically upgrades to the latest Laravel release
    ./upgrade.sh 5.7.10  # Upgrades to a specific Laravel version
    

    Ensure wget is installed on your system to use the upgrade script.

  • Testing: Run tests using PHPUnit after upgrading:

    vendor/bin/phpunit
    

Deprecation Notice

With the release of illuminate/collections, the Collect package is deprecated. It will only receive updates for Laravel versions 8.0 and 9.0 for package maintainers' convenience. Future projects should consider using the official illuminate/collections package.

FAQ

  • Collect will not develop independently from Illuminate's Collections and is designed to remain aligned with Laravel's implementation.
  • The choice of tightenco/collect over illuminate/collect is to avoid confusion with official Laravel packages.

This package is ideal for developers looking to utilize Laravel's powerful collection manipulation features outside of the Laravel framework itself, providing streamlined, efficient handling of array data.

Tightenco Collect Related Articles

Bring Laravel Collections to JavaScript with Collect.js image

Bring Laravel Collections to JavaScript with Collect.js

Read article
Collect and Monitor Everything About Sent Emails in Your Laravel App image

Collect and Monitor Everything About Sent Emails in Your Laravel App

Read article
Easily deleting old soft-deleted records with Quicksand image

Easily deleting old soft-deleted records with Quicksand

Read article
Use Collections outside Laravel image

Use Collections outside Laravel

Read article
Compare Collection Keys with Laravel's diffKeys Method image

Compare Collection Keys with Laravel's diffKeys Method

Read article
Built with Jigsaw – the Ultimate Showcase of Web Sites Built with Jigsaw image

Built with Jigsaw – the Ultimate Showcase of Web Sites Built with Jigsaw

Read article

Let your users buy domains without leaving your app

If your Laravel app gives users a site, a storefront, or a workspace, they’ll eventually want their own domain. The name.com API lets them search, register, and connect one without leaving your product. It’s a clean REST API, so Laravel’s HTTP client is all you need.

Let your users buy domains without leaving your app

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift