maize-tech/laravel-markable
Add likes, bookmarks, favorites, reactions, and other “marks” to any Eloquent model. Provides traits, relationships, counters, scopes, and ready-to-publish migrations/config so you can implement markable features quickly in Laravel apps.
The package's architecture is well-suited for Laravel applications with its trait-based implementation and separate database tables per mark type (e.g., likes, bookmarks), avoiding polymorphic table bloat while maintaining performance. It leverages Laravel's Eloquent relationships and morphs for model associations, aligning with standard Laravel patterns. However, the multi-table approach complicates cross-mark analytics (e.g., aggregating likes + reactions) and requires careful schema management. Integration feasibility is high due to straightforward Composer installation, clear migration publishing steps, and minimal config customization. Key technical risks include zero Packagist dependents (indicating low real-world adoption), potential untested edge cases in polymorphic relationships, and lack of documented performance benchmarks for high-volume scenarios. Critical questions: How does the package handle concurrent writes to the same mark record? Are indexes optimized for common queries (e.g., user_id + markable_id)? What happens if the user model changes after installation? How does it scale beyond 1M+ mark records per table?
The package fits seamlessly into Laravel 8-12 stacks with no external dependencies beyond core Laravel components. For new projects, integration is trivial: add the trait to models, configure allowed values, and publish migrations. For existing applications, a phased migration path is required: first validate current mark-related data structures against the package's table schema (e.g., markable_bookmarks), then build data transformers to migrate existing likes/bookmarks into the new tables. Compatibility is strong with other Laravel packages but requires auditing for conflicts in polymorphic relationship usage (e.g., if another package uses morphs heavily). Sequencing should prioritize: 1) Configuring table_prefix and allowed_values in markable.php, 2) Publishing only required migrations (e.g., --tag="markable-migration-like"), 3) Updating models incrementally (start with low-traffic features like bookmarks before likes), 4) Implementing unit tests for mark
How can I help you explore Laravel packages today?