Add Social Reactions to Laravel Eloquent Models. It lets people express how they feel about the content. Fully customizable Weighted Reaction System & Reaction Type System with Like, Dislike and any other custom emotion types. Do you react?

Overview

Laravel Love

cog-laravel-love

Discord Releases Build Status StyleCI Code Quality License

Introduction

Laravel Love is emotional part of the application. It let people express how they feel about the content. Make any model reactable in a minutes!

There are many implementations in modern applications:

  • Github Reactions
  • Facebook Reactions
  • YouTube Likes
  • Slack Reactions
  • Reddit Votes
  • Medium Claps

This package developed in mind that it should cover all the possible use cases and be viable in enterprise applications.

Official Documentation

Documentation can be found in Laravel Love Guide.

Installation

Pull in the package through Composer.

$ composer require cybercog/laravel-love

Run database migrations.

$ php artisan migrate

Upgrading

Please see UPGRADING for detailed upgrade instructions.

License

About CyberCog

CyberCog is a Social Unity of enthusiasts. Research best solutions in product & software development is our passion.

CyberCog

Comments
  • whereReactedBy fails when reacter/reactant are in different database than the Laravel Love tables

    whereReactedBy fails when reacter/reactant are in different database than the Laravel Love tables

    I have a project that uses 6 different databases, most of all my important data is in a database different from the main Laravel database that I called "core". However my main User database is in the main "core" database, almost everything else is in a 'data' database.

    Using this setup I am able to use Laravel Love without a hitch so far.. I can add/remove reactions and all the tables and counts are working correctly.

    My main use of Laravel Love is that users can like other users. Very simple.

    Today I tried to do this:

    $users = User::with('profile')->whereReactedBy($user, 'Like')->get();
    

    And I ran into this error:

    <!--
    Illuminate\Database\QueryException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'core.love_reactants' doesn't exist (SQL: select * from `core`.`users` where exists (select * from `love_reactants` where `core`.`users`.`love_reactant_id` = `love_reactants`.`id` and exists (select * from `love_reactions` where `love_reactants`.`id` = `love_reactions`.`reactant_id` and `reacter_id` = 6176 and `reaction_type_id` = 1)) and `core`.`users`.`deleted_at` is null) in file /Volumes/Memories/Photos/2012/PictureBright/DEV/_NS/2020/omega-api.nomadsoulmates.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 671
    

    I've run into such issues with other relations cross-database and usually the fix is as simple as going inside the model file and prefixing the table with the database name

    So something like this:

    class Comment extends Model
    {
        protected $table = 'data.matches';
    

    The problem is I can't do this with the Love models since they are in your codebase. I haven't tried binding my own models in place of yours so I can add this one extra line.

    I did define in the love.php configuration file that it should use my database connection and things have worked so far. I guess this would work if you also prefixed the database name to the definition of your tables in your vendor models when the user specifies a custom database connection.

    If you have another solution to offer I would love to hear it.

    Thank you very much!

    bug 
    opened by vesper8 24
  • Add Artisan commands for registering Reacter & Reactant models

    Add Artisan commands for registering Reacter & Reactant models

    Resolves #105

    Need to add 2 Artisan commands for populating love_reacter_id & love_reactant_id columns.

    Register Reacterable models as Reacter

    Variant 1

    love:register-reacter --model=User --ids=1,2
    

    Variant 2

    love:reacter-register --model=User --ids=1,2
    

    Variant 3

    love:register reacter --model=User --ids=1,2
    

    Variant 4

    love:reacter register --model=User --ids=1,2
    

    Variant 5

    able:register love-reacter --model=User --ids=1,2
    

    Register Reactable models as Reactant.

    Variant 1

    love:register-reactant --model=Comment --ids=1,2
    

    Variant 2

    love:reactant-register --model=Comment --ids=1,2
    

    Variant 3

    love:register reactant --model=Comment --ids=1,2
    

    Variant 4

    love:reactant register --model=Comment --ids=1,2
    

    Variant 5

    able:register love-reactant --model=Comment --ids=1,2
    
    enhancement help wanted 
    opened by antonkomarev 21
  • Make model table names configurable

    Make model table names configurable

    Proof of concept https://github.com/cybercog/laravel-love/issues/164#issuecomment-622610209 Resolves #163

    Define any custom table name in config/love.php file

    'storage' => [
        'database' => [
            'connection' => env('DB_CONNECTION', 'mysql'),
            'tables' => [
                'love_reacters' => 'custom_reacters',
                'love_reactants' => 'custom_reactants',
                'love_reaction_types' => 'data.reaction_types',
            ],
        ],
    ],
    

    Table names with null value will use values from Model's $table class property.

    Different schema/database could be defined for cross-schema queries by adding its name with dot on the end before the table name, eg. data.reaction_types. More details read in #163

    enhancement bugfix 
    opened by antonkomarev 15
  • get reaction name from getReactionCounters()

    get reaction name from getReactionCounters()

    hi, I'm fighting with this package a bit owing to the lack of examples and have a bunch on quesitons.

    In order to keep the processing to a minimum, I would like to get the name of the reaction from the getReactionCounters(). currently I don't think this is possible. or is it?

    • I don't seem to be able to see a way to get love_reaction_type table data from getReactionCounters()

    Would you have an example to achieve this please?

    question 
    opened by jayenne 12
  • Why records in love_reactant_reaction_counters table are not creating?

    Why records in love_reactant_reaction_counters table are not creating?

    hey @antonkomarev Am trying to use the react to function, the new react has been stored successfully in love_reactions table, while cannot store the related records in love_reactant_reaction_counters and love_reactant_reaction_totals so I cannot get the reaction count!

    here is my code for following up: Am using **MySQL 5.6

    function reactTo($type,  $weight = 1)
        {
            $user = getAuthUser();
            if ($user){
                // get reaction type
                if (is_null($type)){
                    $type = 'like';
                }
                $reactionType = ReactionType::fromName($type);
                $typeName = $reactionType->getName(); 
    
                if ($this->isNotRegisteredAsLoveReactant()){
                    $this->registerAsLoveReactant();
                }
    
                if ($user->isNotRegisteredAsLoveReacter()){ // false
                    $user->registerAsLoveReacter();
                }
                $reacterFacade = $user->viaLoveReacter();
    
                $isNotReacted = $reacterFacade->hasNotReactedTo($this);
                if ($isNotReacted){
                    $reacterFacade->reactTo($this, $typeName, $weight);
                }
            }
            return false;
        }
    
    question 
    opened by coral4host 12
  • cannot use custom migrations even after publishing them

    cannot use custom migrations even after publishing them

    It seems that as a result of the PR here https://github.com/cybercog/laravel-love/pull/11

    Even if you publish the migrations, the changes are ignored and instead the package's migrations are used.

    On a side note, I personally feel that it was ok how you were doing it before, that in order to use the package the user is required to publish the migrations first.. this is how 90% of packages that depend on migrations are doing it.. and it leaves more flexibility

    So I would just revert that PR and include publishing the migrations in the docs, which you already do.

    opened by vesper8 12
  • [Question] How to make reaction faster?

    [Question] How to make reaction faster?

    I love the package but the background jobs are being process after the view is being send to the frontend which makes it very strange for the user. So if we have a website with posts. Each post have love and hate reaction. If the user clicks to add a new reaction because this reactions are processed in the background the user needs to wait few seconds which is not possible in some cases or not good.

    @cybercog Can you explain how to deal with this? The easiest way is to specify queue which to process this reactions.

    question 
    opened by vlados 11
  • Limit possible reactions amount from Reacter

    Limit possible reactions amount from Reacter

    Idea by @jwktje first appeared in Reddit comment.

    Allow someone to vote/react once per day for example.

    Need to collect all feature requirements before implementation.

    enhancement help wanted 
    opened by antonkomarev 11
  • Add Power to Reactions

    Add Power to Reactions

    Possible names:

    • Reaction Power
    • Reaction Rate
    • Reaction Force
    • Reaction Strength

    Case 1

    Allow Reacter to react to Reactant with same reaction type more than once.

    Example: In social news application user Jane can vote up article up to 5 times.

    Similar to Medium's Claps:

    • https://uxdesign.cc/fifty-shades-of-claps-a-case-study-for-clapping-on-medium-22c6e7b71140

    Case 2

    Reacter has some kind of authority inside of the application and his reactions should have more weight among others.

    Example: In Question & Answer application user Jane solved more than 1000 questions. Jane's reactions will have more power now.

    Additionally by this way it will be easier segregate reactions from more notable application users.

    enhancement help wanted 
    opened by antonkomarev 11
  • Artisan commands for registering existing models as reactants/reacters

    Artisan commands for registering existing models as reactants/reacters

    Fairly straightforward. These two artisan commands can be invoked to register any or all existing model rows for reactants or reacters. Both commands accept the same parameters, as outlined below.

    Command Help

    Here is the output of artisan help for the love:register-reactant command (the reacter command follows a similar pattern):

    image

    Use Cases

    Process all records for the passed model:

    php artisan love:register-reactables App\\Models\\Entry
    php artisan love:register-reacters App\\Models\\User
    

    Process specific records for the passed model:

    php artisan love:register-reactables App\\Models\\Entry --ids=1,2,3,4,19
    php artisan love:register-reacters App\\Models\\User --ids=200,312,319
    

    Sample output (yes, I love progress bars lol):

    image

    Feel free to merge and make any changes or tweaks that you feel necessary.

    enhancement 
    opened by sburkett 10
  • How to highlight liked posts (by current user) within all posts

    How to highlight liked posts (by current user) within all posts

    Hi, my scenario is I'm showing all the recent posts to user and I have added the heart icon on each post and when the user likes a post it's highlighted in red and if not it's just showing the border of the heart. so that the user knows a post has already been liked or no. the question is how to highlight the posts that like by the user with in all posts. That's my code: My controller:

     $newUser = User::where('uid', '=', $user->uid)->first();
    
            $posts = Post::where('status', 'published')->latest()->take(75)->get();
    
            //Return collection of posts as resource
            return PostSource::collection($posts);
    

    My resource:

    public function toArray($request)
        {
            return [
            'id' => $this->id,
            'source_id' => SourceResource::collection($this->whenLoaded('source')),
            'source_name' => $this->source,
            'category_id' => CategoryResource::collection($this->whenLoaded('category')),
            'category_name' => $this->category,
            'fav_info' => $this->users,
            'title' => $this->title,
            'created_at' => $this->created_at,
            ];
        }
    

    So I know there's nothing in the code above related to this library but I;m already using it to add likes and deslikes and grab the current users posts that he liked. but I can't highlight the liked posts within all the posts. Thanks

    question 
    opened by Xoshbin 10
  • Is there no place to see this working?

    Is there no place to see this working?

    I've looked all through the github info, and all through the docs here: https://laravel-love.readme.io/docs but still can't find a way to see it. Help.

    opened by MacelinCane 5
  • Not working with database prefix

    Not working with database prefix

    The joinReactionTotal (scopeJoinReactionTotal) all scoped methods are not working with a database prefix. You get an "column not found" error.

    opened by tvillager 1
  • would it be possible to expose the datetime of reactions

    would it be possible to expose the datetime of reactions

    This is a continuation of an idea started in https://github.com/cybercog/laravel-love/issues/181

    I would find it extremely useful to be able to easily retrieve the reaction date when using scopeWhereReactedTo or scopeWhereReactedBy

    I have users liking other users and I would like to be able to display to a user who has liked them and when specifically that like has been received

    Right now those scopes return the users that have reacted to/by the specfied reaction type.. but I'm not seeing an easy way to also retrieve more details about that reaction, namely the datetime it occurred at

    The following lends itself to a n+1 problem.. but this is the workaround I came up with to retrieve the raw reaction from the db table in order to expose the datetime of the reaction itself which is useful in my case

    $rawReaction = (new Love)->getRawReaction($user, User::find(request('viaResourceId')), 'LIKE');
    
    <?php
    
    namespace App\Helpers;
    
    use App\Models\LoveReaction;
    
    class Love
    {
        public function getRawReaction($reactable, $reacterable, $reactionType)
        {
            $rawReaction = LoveReaction::where('reactant_id', $reactable->love_reactant_id)
            ->where('reacter_id', $reacterable->love_reacter_id)
            ->where('reaction_type_id', config('love.reaction-types')[$reactionType])
            ->first();
    
            return $rawReaction;
        }
    }
    
    <?php
    
    namespace App\Models;
    
    use Illuminate\Database\Eloquent\Model;
    
    class LoveReaction extends Model
    {
        protected $table = 'love_reactions';
    }
    
    enhancement 
    opened by vesper8 0
  • Unable to use likeBy() method

    Unable to use likeBy() method

    When I try to use $model->likeBy($user->id) the following is returned:

    Call to undefined method App\Product::likeBy() {"exception":"[object] (BadMethodCallException(code: 0): Call to undefined method App\\Product::likeBy() at /home/vagrant/sites/site-server/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php:50)

    In order to trigger a like action (or at least see data land in the love_reactions table), I have to use this pretty verbose code:

    $reactionType = ReactionType::fromName('Like');
    $reacter = $user->getLoveReacter();
    $reactant = $product->getLoveReactant();
    $reaction = $reacter->reactTo($reactant, $reactionType);
    

    Yet when I dd($reaction) it is empty.

    What am I missing here? The readme or documentation doesn't really explain how to explicitly set a like/dislike, so I'm really grabbing what I can from closed tickets and a lot of trail and error.

    opened by zachisit 9
  • Add query scopes to Reacterable trait

    Add query scopes to Reacterable trait

    This MR adds whereReactedTo & whereNotReactedTo query scopes to Reacterable trait to find all Reacterable models who reacted to the Reactable model. This concept was born after discussion with @vesper8 in #181

    Find users who reacted with any type of reaction to the article

    $article = Article::whereKey(1)->firstOrFail();
    
    $usersReactedToArticle = User::whereReactedTo($article);
    

    Find users who reacted with one concerete type of reaction to the article

    $article = Article::whereKey(1)->firstOrFail();
    $likeReactionType = ReactionType::fromName('Like');
    
    $usersLikedTheArticle = User::whereReactedTo($article, $likeReactionType);
    

    This MR doesn't have tests yet and I'm not sure if we should add it to the minor release.

    enhancement 
    opened by antonkomarev 1
  • Usage with Laravel Nova possible?

    Usage with Laravel Nova possible?

    I see that you have a laravel-ban-nova package so maybe you have an idea how I can use Laravel Love with Laravel Nova?

    Basically I have a reaction type called "like" and I want to show the users that a user has liked inside Laravel Nova

    And I am unsure how to go about achieving this.

    I would like to use Nova's HasMany field but I don't know how to defined the liked relationship on my User model

    Could you offer some assistance please?

    question 
    opened by vesper8 16
Releases(8.9.0)
  • 8.9.0(Feb 23, 2022)

    Added

    • Added Laravel 9 support by @antonkomarev in https://github.com/cybercog/laravel-love/pull/206

    Full Changelog: https://github.com/cybercog/laravel-love/compare/8.8.1...8.9.0

    Source code(tar.gz)
    Source code(zip)
  • 8.8.1(Apr 3, 2021)

  • 8.8.0(Apr 3, 2021)

    Removed

    • (#196) Dropped Laravel 5.7 support
    • (#196) Dropped Laravel 5.8 support

    Fixed

    • (#196) Fixed CVE-2021-21263 vulnerability
    • (#196) Fixed GHSA-x7p5-p2c9-phvg vulnerability
    Source code(tar.gz)
    Source code(zip)
  • 8.7.1(Dec 8, 2020)

    Fixed

    • (#186) Improve CLI application performance by replacing $name with $defaultName static property in commands
    • (#187) Fixed inconsistency in method parameter names
    Source code(tar.gz)
    Source code(zip)
  • 8.7.0(Dec 6, 2020)

  • 8.6.1(Oct 4, 2020)

  • 8.6.0(Oct 2, 2020)

  • 8.5.0(Sep 8, 2020)

  • 8.4.0(May 22, 2020)

  • 8.3.1(Mar 6, 2020)

  • 8.3.0(Feb 16, 2020)

    Added

    • (#146) Extracted logic from Cog\Laravel\Love\Reactant\Listeners\IncrementAggregates listener to Cog\Laravel\Love\Reactant\Jobs\IncrementReactionAggregatesJob
    • (#146) Extracted logic from Cog\Laravel\Love\Reactant\Listeners\DecrementAggregates listener to Cog\Laravel\Love\Reactant\Jobs\DecrementReactionAggregatesJob
    • (#147) Extracted event listeners registering from Cog\Laravel\Love\LoveServiceProvider to Cog\Laravel\Love\LoveEventServiceProvider
    • (#148) Extracted rebuild of reactant reactions counters from Cog\Laravel\Love\Console\Commands\Recount command to Cog\Laravel\Love\Reactant\Jobs\RebuildReactionAggregatesJob
    • (#148) Added --queue-connection= option to love:recount Artisan command

    Fixed

    • (#148) Fixed love:recount Artisan command execution when love_reactant_reaction_totals database table is empty
    • (#151) Fixed love:recount Artisan command return type

    View the changes from 8.2.0 to 8.3.0

    Source code(tar.gz)
    Source code(zip)
  • 8.2.0(Jan 30, 2020)

  • 8.1.2(Sep 22, 2019)

  • 8.1.1(Sep 13, 2019)

  • 8.1.0(Sep 3, 2019)

    Added

    • (#113) Laravel 6 support

    Changed

    • (#110) Removed dependency of RateOutOfRange exception in contracts namespace on concrete Reaction model implementation
    • (#110) Renamed withValue method to withValueBetween in RateOutOfRange exception
    • (#110) Added $minimumRate parameter to withValueBetween method in RateOutOfRange exception
    • (#110) Added $maximumRate parameter to withValueBetween method in RateOutOfRange exception
    • (#111) Changed $rate parameter type from float to ?float of hasReactedTo method in Reacter model contract
    • (#111) Changed $rate parameter type from float to ?float of hasNotReactedTo method in Reacter model contract

    View the changes from 8.0.0 to 8.1.0

    Source code(tar.gz)
    Source code(zip)
  • 5.3.0(Sep 3, 2019)

  • 8.0.0(Aug 8, 2019)

    Code has a lot of breaking changes because of new Weighted Reaction System.

    Follow upgrade instructions to migrate code & database to new structure.

    Added

    • Added love:upgrade-v7-to-v8 Artisan command
    • (#90) Added ReactionCounter::COUNT_DEFAULT public constant
    • (#90) Added ReactionCounter::WEIGHT_DEFAULT public constant
    • (#90) Added ReactionTotal::COUNT_DEFAULT public constant
    • (#90) Added ReactionTotal::WEIGHT_DEFAULT public constant
    • (#91) Added Reaction::RATE_DEFAULT public constant
    • (#91) Added Reaction::RATE_MIN public constant
    • (#91) Added Reaction::RATE_MAX public constant
    • (#91) Added ReactionType::MASS_DEFAULT public constant
    • (#91) Added rate attribute to Reacter model
    • (#91) Added rate DECIMIAL(4, 2) column to love_reactions db table
    • (#91) Added ability to call Reacter::reactTo with already reacted reactant, same reaction type, but only rate differs
    • (#91) Added Cog\Contracts\Love\Reaction\Exceptions\RateOutOfRange exception
    • (#100) Added Cog\Contracts\Love\Reaction\Exceptions\RateInvalid exception
    • (#96) Added progress bar to love:recount Artisan command
    • (#97) Added ability to call Reactable::joinReactionCounterOfType more than once
    • (#102) Added scopeWhereNotReactedBy scope to Reactable model trait

    Changed

    • (#79) Renamed isReactedTo method to hasReactedTo in Reacter model contract
    • (#79) Added $reactionType parameter to hasReactedTo in Reacter model contract
    • (#91) Added $rate parameter to hasReactedTo method in Reacter model contract
    • (#91) Added $rate parameter to hasReactedTo method in Reacter facade contract
    • (#79) Renamed isNotReactedTo method to hasNotReactedTo in Reacter model contract
    • (#79) Added $reactionType parameter to hasNotReactedTo in Reacter model contract
    • (#91) Added $rate parameter to hasNotReactedTo method in Reacter model contract
    • (#91) Added $rate parameter to hasNotReactedTo method in Reacter facade contract
    • (#79) Added $reactionType parameter to isReactedBy in Reactant model contract
    • (#91) Added $rate parameter to isReactedBy method in Reactant model contract
    • (#91) Added $rate parameter to isReactedBy method in Reactant facade contract
    • (#79) Added $reactionType parameter to isNotReactedBy in Reactant model contract
    • (#91) Added $rate parameter to isNotReactedBy method in Reactant model contract
    • (#91) Added $rate parameter to isNotReactedBy method in Reactant facade contract
    • (#83) Artisan command love:reaction-type-add awaits options instead of arguments
    • (#87) Resolving models default attributes values moved from accessors to Eloquent methods
    • (#88) Renamed weight attribute to mass in ReactionType model
    • (#88) Renamed getWeight method to getMass in ReactionType model contract
    • (#89) Added $reactionType parameter to scopeWhereReactedBy method in Reactable model trait
    • (#90) Moved count & weight attributes default values of ReactionCounter to application level
    • (#90) Moved count & weight attributes default values of ReactionTotal to application level
    • (#91) Changed getWeight method return type from int to float in reactant's ReactionCounter model contract
    • (#91) Changed $amount parameter type from int to float of incrementWeight method in reactant's ReactionCounter model contract
    • (#91) Changed $amount parameter type from int to float of decrementWeight method in reactant's ReactionCounter model contract
    • (#91) Changed getWeight method return type from int to float in reactant's ReactionTotal model contract
    • (#91) Changed $amount parameter type from int to float of incrementWeight method in reactant's ReactionTotal model contract
    • (#91) Changed $amount parameter type from int to float of decrementWeight method in reactant's ReactionTotal model contract
    • (#91) Added ?float $rate parameter to reactTo method in Reacter facade contract
    • (#91) Added ?float $rate parameter to reactTo method in Reacter model contract
    • (#91) Added getRate method to Reaction model contract
    • (#91) Changed getWeight method return type from int to float in Reaction model contract
    • (#91) Changed weight column type to DECIMIAL(13, 2) in love_reactant_reaction_counters db table
    • (#91) Changed weight column type to DECIMIAL(13, 2) in love_reactant_reaction_totals db table
    • (#96) Changed signature of love:recount Artisan command to love:recount {--model=} {--type=}
    • (#99) Make Reacterable parameter nullable in isReactedBy method of Reactant facade contract
    • (#99) Make Reacterable parameter nullable in isNotReactedBy method of Reactant facade contract
    • (#102) Changed second parameter type from Reactant to Reacterable in scopeWhereReactedBy method of Reactable model trait
    • (#102) Changed third parameter type from ?ReactionType to ?string in scopeWhereReactedBy method of Reactable model trait
    • (#97) Added third ?string $alias parameter to scopeJoinReactionCounterOfType method of Reactable model trait
    • (#102) Added second ?string $alias parameter to scopeJoinReactionTotal method of Reactable model trait
    • (#102) Renamed virtual column reactions_count to reaction_{$type}_count in scopeJoinReactionCounterOfType method of Reactable model trait
    • (#102) Renamed virtual column reactions_weight to reaction_{$type}_weight in scopeJoinReactionCounterOfType method of Reactable model trait
    • (#102) Renamed virtual column reactions_total_count to reaction_total_count in scopeJoinReactionTotal method of Reactable model trait
    • (#102) Renamed virtual column reactions_total_weight to reaction_total_weight in scopeJoinReactionTotal method of Reactable model trait

    Removed

    • (#86) Laravel 5.6 support obsolete
    • (#79) Removed isReactedToWithType method from Reacter model contract
    • (#79) Removed isNotReactedToWithType method from Reacter model contract
    • (#79) Removed isReactedByWithType method from Reactant model contract
    • (#79) Removed isNotReactedByWithType method Reactant model contract
    • (#89) Removed scopeWhereReactedByWithType method from Reactable model trait

    View the changes from 7.2.1 to 8.0.0

    Source code(tar.gz)
    Source code(zip)
  • 7.2.1(Jul 11, 2019)

  • 7.2.0(Jun 30, 2019)

  • 7.1.0(Jun 23, 2019)

  • 7.0.1(Jun 22, 2019)

  • 7.0.0(Jun 21, 2019)

  • 6.2.1(Jun 13, 2019)

  • 6.2.0(Jun 13, 2019)

  • 6.1.0(May 7, 2019)

  • 6.0.1(Mar 5, 2019)

  • 5.2.1(Mar 5, 2019)

  • 6.0.0(Feb 25, 2019)

    Package API was refactored from a scratch. Code has a lot of breaking changes and cannot be updated easily.

    Follow upgrade instructions to migrate database to new structure.

    Added

    • Laravel 5.8 support
    • ReactionType model
    • Reacter model
    • Reactant model
    • ReactionTotal model
    • ReactionHasBeenAdded event
    • ReactionHasBeenRemoved event
    • love_reacters database table was added
    • love_reactants database table was added
    • love_reaction_types database table was added
    • love_reactant_reaction_totals database table was added

    Changed

    • Liker trait replaced with Reacterable
    • Likeable trait replaced with Reactable
    • LikeCounter model replaced with ReactionCounter
    • love_likes database table was replaced with love_reactions
    • love_like_counters database table was replaced with love_reactant_reaction_counters
    • ReactionCounter updates on background using queue
    • ReactionTotal updates on background using queue

    Removed

    • Laravel 5.5 support obsolete
    • PHP < 7.1.3 support obsolete
    • LikeableWasLiked event was removed
    • LikeableWasDisliked event was removed
    • LikeableWasUnliked event was removed
    • LikeableWasUndisliked event was removed

    View the changes from 5.2.0 to 6.0.0

    Source code(tar.gz)
    Source code(zip)
  • 5.2.0(Sep 9, 2018)

  • 5.1.1(Feb 16, 2018)

Owner
cybercog
CyberCog is a Social Unity of enthusiasts. Developing best solutions in the field of product & software development is our passion.
cybercog
Integrate likes, bookmarks, favorites, reactions and custom made marks into your application

Laravel Markable This package allows you to easily add the markable feature to your application, as for example likes, bookmarks, favorites and so on.

H-FARM Innovation 438 Sep 28, 2022
Observe (and react to) attribute changes made on Eloquent models.

Laravel Attribute Observer Requirements PHP: 7.4+ Laravel: 7+ Installation You can install the package via composer: composer require alexstewartja/la

Alex Stewart 52 Sep 22, 2022
Fully customizable and tests supported Laravel admin dashboard for developers.

Laravel Admin dashboard Like Laravel Jetstream but built with Hotwire Turbo + additional perks. Tools used: tailwindcomponents/dashboard Hotwire Turbo

null 11 Aug 14, 2022
The package lets you generate TypeScript interfaces from your Laravel models.

Laravel TypeScript The package lets you generate TypeScript interfaces from your Laravel models. Introduction Say you have a model which has several p

Boris Lepikhin 277 Sep 18, 2022
Stop duplicating your Eloquent query scopes and constraints in PHP. This package lets you re-use your query scopes and constraints by adding them as a subquery.

Laravel Eloquent Scope as Select Stop duplicating your Eloquent query scopes and constraints in PHP. This package lets you re-use your query scopes an

Protone Media 72 Sep 21, 2022
This package lets you add uuid as primary key in your laravel applications

laravel-model-uuid A Laravel package to add uuid to models Table of contents Installation Configuration Model Uuid Publishing files / configurations I

salman zafar 10 May 17, 2022
A package to generate YouTube-like IDs for Eloquent models

Laravel Hashids This package provides a trait that will generate hashids when saving any Eloquent model. Hashids Hashids is a small package to generat

Λгi 25 Aug 31, 2022
A simple Content Moderation System for Laravel 5.* that allows you to Approve or Reject resources like posts, comments, users, etc.

Laravel Moderation A simple Moderation System for Laravel 5.* that allows you to Approve or Reject resources like posts, comments, users, etc. Keep yo

Alex Kyriakidis 509 Aug 15, 2022
Ebansos (Electronic Social Assistance) is a web application that provides citizen data management who will receive social assistance to avoid misdirection assistance from public service/government.

E Bansos Ebansos (Electronic Social Assistance) is a web application that provides citizen data management who will receive social assistance to avoid

Azvya Erstevan I 12 Apr 17, 2022
Make your own custom cast type for Laravel model attributes

Laravel Custom Casts Make your own cast type for Laravel model attributes Laravel custom casts works similarly to Eloquent attribute casting, but with

Vladimir Ković 219 Jul 16, 2022
Open source for selling social media accounts or accounts on other platforms.

SELLACC - Open Source Selling Accounts SELLACC is open source for selling social media accounts or accounts on other platforms. ⚠️ We not update sourc

PHAM DUC THANH 6 Sep 21, 2022
It's like React for PHP. Powered by Laravel, Livewire, Tailwind, & Alpine.

Tailwire It's like React for PHP. Powered by Laravel, Livewire, Tailwind, & Alpine. Features: Use a custom view component class namespace Declare rout

null 5 Dec 12, 2021
Laravel Larex lets you translate your whole Laravel application from a single CSV file.

Laravel Larex Translate Laravel Apps from a CSV File Laravel Larex lets you translate your whole Laravel application from a single CSV file. You can i

Luca Patera 68 Sep 16, 2022
This Laravel Nova tool lets you run artisan and bash commands directly from Nova 4 or higher.

Laravel Nova tool for running Artisan & Shell commands. This Nova tool lets you run artisan and bash commands directly from nova. This is an extended

Artem Stepanenko 12 Sep 16, 2022
🏭This package lets you create factory classes for your Laravel project.

Laravel Factories Reloaded ?? This package generates class-based model factories, which you can use instead of the ones provided by Laravel. Laravel 8

Christoph Rumpel 372 Sep 17, 2022
Base library for repeated layout fields, content builders and other collection components

laravel-flexible-content This package's only purpose is to build custom repeated layout components, such as Laravel Nova's Flexible Content field or y

Whitecube 5 May 31, 2022
Easily add all the 58 Algerian Wilayas and its Dairas to your cool Laravel project (Migrations, Seeders and Models).

Laravel-Algereography Laravel-Algereography allows you to add Migrations, Seeders and Models of Algerian Wilayas and Dairas to your existing or new co

Hocine Saad 45 Sep 18, 2022
An Eloquent Way To Filter Laravel Models And Their Relationships

Eloquent Filter An Eloquent way to filter Eloquent Models and their relationships Introduction Lets say we want to return a list of users filtered by

Eric Tucker 1.5k Sep 27, 2022
Laravel Ban simplify blocking and banning Eloquent models.

Laravel Ban Introduction Laravel Ban simplify management of Eloquent model's ban. Make any model bannable in a minutes! Use case is not limited to Use

cybercog 849 Sep 23, 2022