- What is zareismail/markable used for in Laravel?
- Markable is a Laravel package for adding marks such as likes, bookmarks, or favorites to Eloquent models through polymorphic relationships. It provides traits and query helpers to attach, remove, and retrieve marks across your application. It operates at the Eloquent query-builder layer, so you can adopt it model by model rather than application-wide.
- How do I install zareismail/markable?
- Install it with Composer using composer require zareismail/markable. The assessment expects Laravel package auto-discovery to resolve the service provider, but you should confirm that in your application. Pin to ^1.0 rather than a wildcard or dev-master, and commit your lockfile.
- Which Laravel and PHP versions does markable support?
- The provided context does not state a Laravel or PHP support matrix, and the package only added Composer versioning at v1.0.0. Check the composer.json illuminate/* constraints and the repository release notes before adopting it. Verify that your host application's Laravel version falls inside that range rather than assuming compatibility.
- Does markable require database migrations or schema changes?
- The technical assessment describes integration as a Composer require plus model-level changes, with no schema change, queue worker, scheduled job, or external service. It stores marks through polymorphic Eloquent relationships rather than modifying host model tables. Confirm the package's own migration or table requirements in the repository before rollout.
- How do I add likes or bookmarks to an Eloquent model with markable?
- You opt in per model by applying the package trait and using its query helpers to attach or remove marks. Adoption is intended to be model by model, so the blast radius is limited to the models you change. Diff the generated SQL against any local scope logic you replace to confirm equivalence.
- Is markable safe to use in production at v1.0.0?
- Treat v1.0.0 as a starting line, not proof of maturity. The release notes include a fix for a wrong scope query call, and scope bugs fail silently by returning subtly incorrect data rather than throwing an exception. Re-validate any query path that used the package before that fix, and pin to ^1.0 while 1.0.x patch history accumulates.
- What was the wrong scope query call bug in markable v1.0.0?
- The context says v1.0.0 fixed a wrong scope query call, meaning the scope resolved its underlying query incorrectly. It does not specify whether the defect was a wrong operator, column, table alias, or dropped constraint. That distinction determines whether historical results are suspect, so audit affected query paths against known-good expectations.
- How should I test markable query scopes?
- Add a small test harness that asserts the generated SQL, not just row counts, for each scope you adopt. This is the control that catches the silent scope-query class of bug fixed in v1.0.0. Also confirm auto-discovery resolves and that no global macros or scope-name collisions appear on candidate models.
- Will markable conflict with my existing local Eloquent scopes?
- Scope-name collisions with existing local scopes on host models are a listed secondary risk. The context also asks whether the package registers global macros or only per-model scopes, because global registration widens the blast radius considerably. Check the service provider and test candidate models in a local environment before staging.
- Who maintains zareismail/markable and what support policy does it have?
- The context identifies an unknown maintainer and bus factor, with no stated support or security policy. Before adopting, review the repository ownership, release cadence, and whether a test suite exists and asserts generated SQL or only result sets. A bounded dependency is still a dependency, so plan a compatibility check at each Laravel major upgrade.