cybercog/laravel-love
Add reactions, likes, votes, and claps to any Eloquent model. Laravel Love provides a flexible, enterprise-ready system for GitHub/Facebook-style reactions with migrations and upgrade guidance, letting users express feelings about your content in minutes.
Full Changelog: https://github.com/cybercog/laravel-love/compare/10.2.0...10.2.1
Full Changelog: https://github.com/cybercog/laravel-love/compare/10.1.0...10.2.0
Full Changelog: https://github.com/cybercog/laravel-love/compare/10.0.1...10.1.0
Full Changelog: https://github.com/cybercog/laravel-love/compare/10.0.0...10.0.1
Full Changelog: https://github.com/cybercog/laravel-love/compare/9.0.0...10.0.0
Code has breaking changes because of Eloquent Model local scopes refactoring.
Follow upgrade instructions from v8 to v9 to migrate code.
whereReactedTo model scope to Reacterable modelswhereNotReactedTo model scope to Reacterable modelswhereReactedToBetween model scope to Reacterable modelsReactableEloquentBuilderTraitlove:setup-reactable generates migration with nullable column love_reactant_id by defaultlove:setup-reactable option --nullable replaced with --not-nullablelove:setup-reacterable generates migration with nullable column love_reacter_id by defaultlove:setup-reacterable option --nullable replaced with --not-nullablelove:recount use default queue connection if --queue-connection option is not definedAsCommand attributeFull Changelog: https://github.com/cybercog/laravel-love/compare/8.9.0...9.0.0
Full Changelog: https://github.com/cybercog/laravel-love/compare/8.8.1...8.9.0
$name with $defaultName static property in commandsCog\Laravel\Love\Reactant\Listeners\IncrementAggregates listener to Cog\Laravel\Love\Reactant\Jobs\IncrementReactionAggregatesJobCog\Laravel\Love\Reactant\Listeners\DecrementAggregates listener to Cog\Laravel\Love\Reactant\Jobs\DecrementReactionAggregatesJobCog\Laravel\Love\LoveServiceProvider to Cog\Laravel\Love\LoveEventServiceProviderCog\Laravel\Love\Console\Commands\Recount command to Cog\Laravel\Love\Reactant\Jobs\RebuildReactionAggregatesJob--queue-connection= option to love:recount Artisan commandlove:recount Artisan command execution when love_reactant_reaction_totals database table is emptylove:recount Artisan command return typeRateOutOfRange exception in contracts namespace on concrete Reaction model implementationwithValue method to withValueBetween in RateOutOfRange exception$minimumRate parameter to withValueBetween method in RateOutOfRange exception$maximumRate parameter to withValueBetween method in RateOutOfRange exception$rate parameter type from float to ?float of hasReactedTo method in Reacter model contract$rate parameter type from float to ?float of hasNotReactedTo method in Reacter model contractCode has a lot of breaking changes because of new Weighted Reaction System.
Follow upgrade instructions to migrate code & database to new structure.
love:upgrade-v7-to-v8 Artisan commandReactionCounter::COUNT_DEFAULT public constantReactionCounter::WEIGHT_DEFAULT public constantReactionTotal::COUNT_DEFAULT public constantReactionTotal::WEIGHT_DEFAULT public constantReaction::RATE_DEFAULT public constantReaction::RATE_MIN public constantReaction::RATE_MAX public constantReactionType::MASS_DEFAULT public constantrate attribute to Reacter modelrate DECIMIAL(4, 2) column to love_reactions db tableReacter::reactTo with already reacted reactant, same reaction type, but only rate differsCog\Contracts\Love\Reaction\Exceptions\RateOutOfRange exceptionCog\Contracts\Love\Reaction\Exceptions\RateInvalid exceptionlove:recount Artisan commandReactable::joinReactionCounterOfType more than oncescopeWhereNotReactedBy scope to Reactable model traitisReactedTo method to hasReactedTo in Reacter model contract$reactionType parameter to hasReactedTo in Reacter model contract$rate parameter to hasReactedTo method in Reacter model contract$rate parameter to hasReactedTo method in Reacter facade contractisNotReactedTo method to hasNotReactedTo in Reacter model contract$reactionType parameter to hasNotReactedTo in Reacter model contract$rate parameter to hasNotReactedTo method in Reacter model contract$rate parameter to hasNotReactedTo method in Reacter facade contract$reactionType parameter to isReactedBy in Reactant model contract$rate parameter to isReactedBy method in Reactant model contract$rate parameter to isReactedBy method in Reactant facade contract$reactionType parameter to isNotReactedBy in Reactant model contract$rate parameter to isNotReactedBy method in Reactant model contract$rate parameter to isNotReactedBy method in Reactant facade contractlove:reaction-type-add awaits options instead of argumentsweight attribute to mass in ReactionType modelgetWeight method to getMass in ReactionType model contract$reactionType parameter to scopeWhereReactedBy method in Reactable model traitcount & weight attributes default values of ReactionCounter to application levelcount & weight attributes default values of ReactionTotal to application levelgetWeight method return type from int to float in reactant's ReactionCounter model contract$amount parameter type from int to float of incrementWeight method in reactant's ReactionCounter model contract$amount parameter type from int to float of decrementWeight method in reactant's ReactionCounter model contractgetWeight method return type from int to float in reactant's ReactionTotal model contract$amount parameter type from int to float of incrementWeight method in reactant's ReactionTotal model contract$amount parameter type from int to float of decrementWeight method in reactant's ReactionTotal model contract?float $rate parameter to reactTo method in Reacter facade contract?float $rate parameter to reactTo method in Reacter model contractgetRate method to Reaction model contractgetWeight method return type from int to float in Reaction model contractweight column type to DECIMIAL(13, 2) in love_reactant_reaction_counters db tableweight column type to DECIMIAL(13, 2) in love_reactant_reaction_totals db tablelove:recount Artisan command to love:recount {--model=} {--type=}Reacterable parameter nullable in isReactedBy method of Reactant facade contractReacterable parameter nullable in isNotReactedBy method of Reactant facade contractReactant to Reacterable in scopeWhereReactedBy method of Reactable model trait?ReactionType to ?string in scopeWhereReactedBy method of Reactable model trait?string $alias parameter to scopeJoinReactionCounterOfType method of Reactable model trait?string $alias parameter to scopeJoinReactionTotal method of Reactable model traitreactions_count to reaction_{$type}_count in scopeJoinReactionCounterOfType method of Reactable model traitreactions_weight to reaction_{$type}_weight in scopeJoinReactionCounterOfType method of Reactable model traitreactions_total_count to reaction_total_count in scopeJoinReactionTotal method of Reactable model traitreactions_total_weight to reaction_total_weight in scopeJoinReactionTotal method of Reactable model traitisReactedToWithType method from Reacter model contractisNotReactedToWithType method from Reacter model contractisReactedByWithType method from Reactant model contractisNotReactedByWithType method Reactant model contractscopeWhereReactedByWithType method from Reactable model traitisReactedTo & isNotReactedTo methods names of Reacter facade were changed to hasReactedTo & hasNotReactedToReacter & Reactant facadesviaLoveReacter method to Reacterable trait & contractviaLoveReactant method to Reactable trait & contractCog\Laravel\Love\Facades\Love global facade--model option of love:setup-reacterable & love:setup-reactable Artisan commandslove:setup-reacterable & love:setup-reactable Artisan commands were addedHow can I help you explore Laravel packages today?