Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Lawman Laravel Package

jonpurvis/lawman

Lawman adds automatic validation to Laravel Eloquent models. Define validation rules directly on a model and have them enforced before saving, helping keep model data consistent without repeating validation logic across your app.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for route hygiene: Lawman is a dev-only (require-dev) Laravel package that encodes route conventions as test assertions. It replaces a bespoke, hand-rolled suite of convention tests that would otherwise be written, reviewed, and maintained internally — a build-vs-buy call that strongly favors buy at this scope.
  • Roadmap: engineering quality as a roadmap item. Adopting it converts "clean up route naming / route sprawl" from a recurring backlog chore into a CI-enforced invariant. That is a scheduling decision a PM can make once and stop re-litigating.
  • Feature and standards enforcement. It supports decisions like "do we require all routes to be named?", "do we allow duplicate or shadowed routes?", "do we require controller actions to exist for every route?" — each of those becomes an explicit, testable policy rather than a reviewer's opinion.
  • Release management / PR review load. Route regressions and dead routes get caught in CI instead of in review or production. This is directly measurable as reduced review cycles on route-touching PRs.
  • v5.2.0 specifically: New Helpers is additive coverage — more conventions can be asserted out of the box without writing custom tests, which lowers the marginal cost of tightening standards. Skeleton updates is package-housekeeping (CI/dependency/boilerplate refresh) and carries no product-visible behavior. No breaking changes, no deprecations: this is a routine minor bump that can ride a normal sprint's dependency update.

When to Consider This Package

Adopt when:

  • You run a Laravel application (or several) with a growing route surface — dozens to hundreds of routes — where naming and duplication drift is a real cost.
  • You already have a Pest or PHPUnit suite wired into CI. Lawman composes into existing test runs; without a test harness the value is near zero.
  • You have, or want to establish, written route conventions. The package is only as useful as the policies you decide to enforce.
  • Multiple engineers or teams touch routing, and you want consistency enforced mechanically rather than by reviewer memory.
  • You want a low-effort quality gate that is cheap to try and cheap to remove (dev dependency, no runtime footprint, no schema or infra change).

Look elsewhere or skip when:

  • The app is small and stable, with a handful of routes and a single maintainer. The convention-drift problem does not exist yet.
  • You have no automated test suite, or tests do not run on every PR. Value depends entirely on CI enforcement.
  • Routing is heavily non-standard (dynamic route registration, package-provided routes, multi-tenant route generation) and your conventions do not map onto simple assertions.
  • You already cover this ground with custom static analysis (e.g., Larastan rules) or an in-house convention test suite. Migrating may not be worth the churn unless the new helpers close specific gaps.
  • Your organization restricts dev-dependency count or requires security/maintenance review for every added package and the marginal value does not clear that bar (this is a single-maintainer package — factor bus-factor risk into the decision, though blast radius is limited to CI since it is dev-only).

How to Pitch It (Stakeholders)

To executives: Lawman is a small, dev-only Laravel package that turns our route conventions into automated checks. It ships with no runtime code, touches no user-facing behavior, and costs roughly a day of integration time plus a policy conversation. In return, route naming and duplication problems get caught automatically on every pull request instead of by reviewers or by customers. The v5.2.0 release is a routine, non-breaking minor update that adds more built-in checks and refreshes the package's internal tooling — no migration work, no deprecations, safe to take in a normal dependency update. Risk is low and reversible: it is a test dependency, so removing it means deleting a line from composer.json.

To engineering: This is a convention-as-tests package for Laravel. It plugs into the Pest/PHPUnit suite you already run, so CI gains route assertions — names present, no duplicates, controller actions resolve, and similar — without anyone writing bespoke test scaffolding. v5.2.0 is additive: new helpers expand what you can assert, plus package skeleton housekeeping; nothing breaks. The trade-off to weigh is that it is a single-maintainer dependency, so treat it as a CI convenience rather than load-bearing infrastructure, and keep the enforced rule set explicit and version-controlled in your test suite so the checks stay meaningful to us rather than generic.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk