e2tmk / hunter
Powerful utility for finding and processing Eloquent model records with a fluent, chainable API.
Fund package maintenance!
e2tmk
Requires
- php: ^8.2
- illuminate/contracts: ^10.0||^11.0||^12.0
- laravel/prompts: ^0.3.5
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^10.0.0||^9.0.0||^8.22.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- rector/rector: *
This package is auto-updated.
Last update: 2025-06-27 18:21:15 UTC
README
Hunter
Powerful utility for finding and processing Eloquent model records with a fluent, chainable API.
Hunter provides a clean way to search for records based on specific criteria and execute multiple actions on them with comprehensive error handling, logging, and advanced flow control.
Installation
You can install the package via Composer:
composer require e2tmk/hunter
Quick Example
use Hunter\Hunter; // Process all pending orders $result = hunter(Order::class) ->find('status', 'pending') ->then(function (Order $order) { $order->process(); }) ->hunt(); echo $result->summary(); // "Total: 15, Successful: 14, Failed: 1, Skipped: 0"
Features
- π Powerful Search: Find records with flexible criteria
- π Fluent API: Chainable methods for clean code
- π― Multiple Actions: Execute several actions per record
- β‘ Flow Control: Skip, fail, or stop processing gracefully
- π Comprehensive Reporting: Detailed statistics and error tracking
Documentation
License
The project is licensed under the MIT License.