Search by

efureev / laravel-support

efureev

PHP Support Package for Laravel

Package info

github.com/efureev/laravel-support

pkg:composer/efureev/laravel-support

Statistics

Installs: 8 241

Dependents: 0

Suggesters: 0

Stars: 4

Open Issues: 0

v5.0.0 2026-09-13 12:19 UTC

README

PHP Laravel Package Latest Stable Version Total Downloads License

Validation rules, Eloquent traits and service-provider scaffolding for Laravel packages and applications. No dependencies beyond the Illuminate components it actually uses.

Requirements

  • PHP >= 8.5
  • Laravel >= 13.0

Install

composer require efureev/laravel-support

Auto-discovered — no manual provider registration. To override the shipped messages:

php artisan vendor:publish --tag=laravel-support-lang

What is in it

Full reference in docs/; the sharp edges are collected in docs/pitfalls.md.

Validation rules Delimited validates each item of a delimited string; Authorized checks a gate against the model a key points at; HasValidate adds one-off validation and typed request reads
PostgreSQL arrays a cast and four query scopes for native text[] / integer[] columns, plus the literal encoder underneath
Sortable hand-ordered model stacks (drag-and-drop friendly), with a migration helper and optional global scopes
Service providers AbstractServiceProvider with runtime-aware boot hooks and helpers for configs, routes, translations, views, policies, commands and bindings
Model cache per-model caching with automatic invalidation and a pluggable cacher
Model traits bind a model into a request or service, resolve it from input, forbid selected methods
Resources & pagination nest a paginated resource collection inside another resource; make additional() merge
Repository a thin Eloquent repository base
Global helpers toCollect(), objectToArray()

Upgrading

5.0 raises the PHP floor to 8.5, drops the efureev/support dependency and moves three exception classes. See docs/upgrade-5.0.md.

Tests

The suite runs against a real PostgreSQL, and the Redis cacher against a real Redis — both bugs those cover were invisible to anything less.

composer test         # PHPCS + PHPStan + PHPUnit
composer test-cover   # the same, with coverage
composer test:docker  # the full gate in containers, no local services needed

Redis tests skip themselves when no server is reachable; composer test:docker and CI both provide one.

Development

This is a library, so composer.lock is intentionally not committed and "lock": false is set in composer.json. Every CI run resolves the latest matching dependency versions, which surfaces incompatibilities with new Laravel/PHP releases early. Pin versions in the consuming application, not here.

.gitattributes keeps tests, docs, CI and Docker out of the Composer archive — only src/, resources/, composer.json, README.md, CHANGELOG.md and LICENSE reach a consumer's vendor/. Verify with git archive --format=tar HEAD | tar -t.

Changelog

See CHANGELOG.md.

License

The MIT License (MIT). See LICENSE.