{"repo":"maize-tech/laravel-markable","free":true,"listed":false,"github":"https://github.com/maize-tech/laravel-markable","clone":"git clone https://github.com/maize-tech/laravel-markable.git","description":"Integrate likes, bookmarks, favorites, reactions and custom made marks into your application","language":"PHP","stars":759,"topics":["laravel","markable","marks","likes","bookmarks","reactions","favorites"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Laravel Markable This package allows you to easily add the markable feature to your application, as for example likes, bookmarks, favorites and so on. Installation You can install the package via composer: The install command will automatically publish the config file. Then publish only the migrations you need: This is the content of the published config file: Usage Basic To use the package, add the Maize\\Markable\\Markable trait to the model where you want to have marks. Once done, you can define the list of possible marks for the given model implementing the $marks array with the list of mark classes' namespace. Here's an example model including the Markable trait and implementing the Like mark: You can now assign likes to the model: Custom metadata If needed, you may also add custom metadata when assigning a mark: Custom mark model The package allows you to define custom marks. First thing you need to do is create a migration which defines the new mark model. The package works with separate tables for each mark in order to increase the performances when executing related queries. The migration table name should contain the prefix defined in table prefix attribute under config/markable.php . Default prefix is set to markable . Here's an example migration for bookmarks: Once done, you can create a new class which extends the abstract Mark class and implement the markableRelationName method, which is used to retrieve the users who marked a given model entity with the mark enti","default_branch":null,"files":null,"tree":[],"storefront":"/r/maize-tech","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/maize-tech/laravel-markable/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}