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

Apposite Laravel Package

monooso/apposite

Apposite is a Laravel package that simplifies defining and managing Eloquent model attributes. It offers a clean, expressive API for custom accessors and computed values, helping keep your models concise, readable, and easy to maintain.

View on GitHub
Deep Wiki
Context7

Conditionally apply Laravel validation rules, even when you don't have access to the validator instance.

Frequently asked questions about Apposite
What is monooso/apposite used for?
Apposite is a Laravel package for applying validation rules conditionally when you do not have access to the validator instance. It is intended to keep conditional rule logic reusable and out of controllers. The package summary also mentions Eloquent model attribute helpers, so confirm the exact API in the README for your installed version.
How do I install monooso/apposite?
Install it with Composer using composer require monooso/apposite. For Laravel 13 and PHP 8.3 or newer you can target the v5 line; for older Laravel versions pin the latest v4 tag. Commit composer.json and composer.lock and run your application test suite after installation.
Which Laravel and PHP versions does apposite support?
Version 5.0.0 requires Laravel 13 and PHP 8.3 or newer. Applications on Laravel 12 or earlier must stay on a prior tagged release, typically the latest v4 tag. The maintainer follows a latest-major-only support policy, so older majors should be treated as community-supported or self-supported.
Can I use apposite with Laravel 10, 11, or 12?
Not with v5.0.0, which is limited to Laravel 13 and PHP 8.3 or newer. You can use an earlier tagged release such as the latest v4 tag if your Laravel and PHP versions match its constraints. Pin that version explicitly and plan your own patch path because the maintainer supports only the newest major.
How do I conditionally apply validation rules without a validator instance?
Apposite is designed for cases where validation rules need to change based on context but you do not have a validator object available to call sometimes on. You define the conditional logic through the package API and reuse it where rules are assembled. Check the README for the exact method names and examples for your version, since the release notes do not document the full API.
Do I need to publish configuration or register a service provider for apposite?
The available release notes do not state that Apposite requires config or asset publishing. Laravel packages usually auto-register their service provider through Composer discovery, but verify provider registration and any publishable files against the README for your pinned version. If you previously relied on Node-built assets, confirm the Node tooling removal did not affect your setup.
How do I test apposite validation rules in my Laravel app?
Write feature or unit tests that assert your validation passes and fails for each conditional scenario you support. If you extend package test utilities, note that the package itself uses PHPUnit 12, while your application can remain on a different PHPUnit version if compatible. Run the suite after upgrading Laravel, PHP, or the package major.
Is monooso/apposite safe for production?
It can be used in production if your stack matches the supported matrix: Apposite v5, Laravel 13, and PHP 8.3 or newer. The main risk is maintenance, because the maintainer supports only the latest major and older pinned versions will not receive upstream fixes. Treat a pinned v4 as an internal support obligation and monitor for security or compatibility issues. Contributors should also note the package's Podman-only local development choice if their workflow uses Docker.
What are alternatives to apposite for conditional Laravel validation?
Laravel's own Rule objects, sometimes, required_if-style rules, and custom validation closures can cover many conditional cases without an extra package. If you need the validator instance, Form Request classes and Validator::make give you direct access. Compare Apposite only if its API meaningfully reduces duplication in your codebase.
How do I upgrade apposite from v4 to v5?
Upgrade PHP to 8.3 first, then move the application to Laravel 13, and only then require Apposite v5. Keep a v4 pin available for rollback and check that your code does not depend on v5-only APIs. Run your full test suite and verify service-provider registration and any package publishing after each step.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo