Skip to content

skulich/laravel-markable

Repository files navigation

Laravel Markable

Laravel Markable is a powerful polymorphic tagging system that allows users to "mark" any content. Whether it's a simple like, a bookmark with notes, or a complex reaction, Markable handles it elegantly using PHP 8 attributes.

Integrate likes, bookmarks, favorites, reactions, and any custom marks into your Laravel application in minutes — using a single, robust polymorphic solution focused on developer experience and performance.

Key Features

  • Polymorphic Relationships: Mark any Eloquent model (Posts, Comments, Users, etc.).
  • PHP 8 Attributes: Define allowed interactions directly in the model header.
  • Counter Cache: Automatically tracks counts (e.g., likes_count) for instant display.
  • JSON Metadata: Store notes or extra data with each interaction.

Table of contents

Installation

Install the package via Composer.

composer require skulich/laravel-markable

# Publish config & migration
php artisan vendor:publish --provider="SKulich\Markable\MarkableServiceProvider"

# Run migrations
php artisan migrate

Usage

...

Tests

Run the entire test suite:

composer test

Changelog

Please see CHANGELOG for more information.

Contributing

Please see CONTRIBUTING for more information.

License

The MIT License (MIT). Please see LICENSE for more information.

About

Laravel Markable is a simple and flexible interaction system for Laravel. Add likes, bookmarks, favorites, reactions, and custom marks to any Eloquent model.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages