PHPackages                             carone/laravel-common - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. carone/laravel-common

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

carone/laravel-common
=====================

1.0(6mo ago)0801MITPHPPHP ^8.2CI passing

Since Dec 31Pushed 6mo agoCompare

[ Source](https://github.com/EmileCar/laravel-common)[ Packagist](https://packagist.org/packages/carone/laravel-common)[ RSS](/packages/carone-laravel-common/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (3)Versions (2)Used By (1)

Laravel Common
==============

[](#laravel-common)

A collection of reusable Laravel utilities and patterns for common application needs.

Use Cases
---------

[](#use-cases)

### 1. Search

[](#1-search)

A flexible search system for building complex queries with search terms and filters.

**Components:**

- **SearchTerm**: Processes and tokenizes user input, splitting on whitespace, hyphens, commas, and slashes
- **SearchCriteria**: Combines a search term with optional filters to define search parameters
- **SearchFilter**: Interface for implementing custom query filters
- **AppliesSearchCriteria**: Interface for repositories/services that apply search criteria to Eloquent queries

**Usage Example:**

```
use Carone\Common\Search\SearchTerm;
use Carone\Common\Search\SearchCriteria;

$searchTerm = new SearchTerm('john doe');
$criteria = new SearchCriteria($searchTerm, [$statusFilter, $dateFilter]);

// In your repository implementing AppliesSearchCriteria:
$query = $this->applySearchCriteria($criteria);
```

**When to use:** Building search functionality with multiple filters, faceted search, or complex query builders.

---

### 2. Bulk Operations

[](#2-bulk-operations)

A robust pattern for executing operations on multiple items with automatic error handling and result tracking.

**Components:**

- **BulkOperation**: Executes a closure on multiple subjects, capturing successes and failures
- **BulkOperationResult**: Tracks which items succeeded, which failed, and provides detailed error information

**Usage Example:**

```
use Carone\Common\BulkOperations\BulkOperation;

$operation = BulkOperation::create(function($user) {
    $user->activate();
    $user->save();
});

$result = $operation->execute(
    $users,
    successHandler: fn($user) => Log::info("Activated: {$user->id}"),
    failureHandler: fn($user, $e) => Log::error("Failed: {$user->id}")
);

$succeeded = $result->getSucceeded();
$failed = $result->getFailed();
$failedWithErrors = $result->getFailedWithErrors();
```

**When to use:** Batch processing, mass updates, import operations, or any scenario where you need to track partial success/failure across multiple items.

---

Installation
------------

[](#installation)

```
composer require carone/laravel-common
```

Testing
-------

[](#testing)

Run all tests:

```
vendor/bin/phpunit
```

Run specific test suite:

```
vendor/bin/phpunit --testsuite=Search
vendor/bin/phpunit --testsuite=BulkOperations
```

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance68

Regular maintenance activity

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

185d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11321042?v=4)[carone](/maintainers/carone)[@carone](https://github.com/carone)

---

Top Contributors

[![EmileCar](https://avatars.githubusercontent.com/u/114223326?v=4)](https://github.com/EmileCar "EmileCar (11 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/carone-laravel-common/health.svg)

```
[![Health](https://phpackages.com/badges/carone-laravel-common/health.svg)](https://phpackages.com/packages/carone-laravel-common)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[spatie/laravel-settings

Store your application settings

1.5k7.3M152](/packages/spatie-laravel-settings)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

198321.1k](/packages/fumeapp-modeltyper)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
