src/Services/LikeableService.php
public function incrementDislikesCount(LikeableContract $likeable)
    {
        $counter = $likeable->dislikesCounter()->first();

        if (!$counter) {
            $counter = $likeable->dislikesCounter()->create([
                'count' => 0,
                'type_id' => LikeType::DISLIKE,
            ]);
        }

        $counter->increment('count');
    }
public function incrementDislikesCount(LikeableContract $likeable)
    {
        $counter = $likeable->dislikesCounter()->first();

        if (!$counter) {
            $counter = $likeable->dislikesCounter()->create([
                'count' => 0,
                'type_id' => LikeType::DISLIKE,
            ]);
        }

        $counter->increment('count');
    }
public function incrementDislikesCount ( LikeableContract $ likeable ) { $ counter = $ likeable -> dislikesCounter ( ) -> first ( ) ; if ( ! $ counter ) { $ counter = $ likeable -> dislikesCounter ( ) -> create ( [ 'count' => 0 , 'type_id' => LikeType :: DISLIKE , ] ) ; } $ counter -> increment ( 'count' ) ; }
Increment the total dislike count stored in the counter.

@param \Cog\Likeable\Contracts\Likeable $likeable
@return void
Increment the total dislike count stored in the counter .