{"repo":"qirolab/laravel-reactions","free":true,"listed":false,"github":"https://github.com/qirolab/laravel-reactions","clone":"git clone https://github.com/qirolab/laravel-reactions.git","description":"Laravel reactions package for implementing reactions (eg: like, dislike, love, emotion, etc) on Eloquent models.","language":"PHP","stars":196,"topics":["laravel","eloquent","love","like","dislike","unlike","favorite","rate","rating","emotion"],"license":"MIT","category":"databases-storage","readme_excerpt":"Add Reactions (like, dislike, etc.) to Eloquent Model Laravel reactions package for implementing reactions (eg: like, dislike, love, emotion etc) on Eloquent models. Video Tutorial ▶️ Laravel Reactions Tutorial Installation Download package into the project using Composer. Registering package Laravel 5.5 (or higher) uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider. For Laravel 5.4 or earlier releases version include the service provider within app/config/app.php : Database Migration If you want to make changes in migrations, publish them to your application first. Run database migrations. Config File You can optionally publish the config file with: Usage Prepare Reacts (User) Model Use Qirolab\\Laravel\\Reactions\\Contracts\\ReactsInterface contract in model which will perform react behavior on reactable model and implement it and use Qirolab\\Laravel\\Reactions\\Traits\\Reacts trait. Prepare Reactable Model Use Qirolab\\Laravel\\Reactions\\Contracts\\ReactableInterface contract in model which will get reaction behavior and implement it and use Qirolab\\Laravel\\Reactions\\Traits\\Reactable trait. Available Methods Reaction Remove Reaction Removing reaction of user from reactable model. Toggle Reaction The toggle reaction method will add a reaction to the model if the user has not reacted. If a user has already reacted, then it will replace the previous reaction with a new reaction. For example, if the user has reacted 'like' on the model. Now on toggle","default_branch":null,"files":null,"tree":[],"storefront":"/r/qirolab","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/qirolab/laravel-reactions/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."}