src/Services/LikeableService.php
public function removeModelLikes(LikeableContract $likeable, $type)
    {
        app(LikeContract::class)->where([
            'likeable_id' => $likeable->getKey(),
            'likeable_type' => $likeable->getMorphClass(),
            'type_id' => $this->getLikeTypeId($type),
        ])->delete();

        app(LikeCounterContract::class)->where([
            'likeable_id' => $likeable->getKey(),
            'likeable_type' => $likeable->getMorphClass(),
            'type_id' => $this->getLikeTypeId($type),
        ])->delete();
    }
public function removeModelLikes(LikeableContract $likeable, $type)
    {
        app(LikeContract::class)->where([
            'likeable_id' => $likeable->getKey(),
            'likeable_type' => $likeable->getMorphClass(),
            'type_id' => $this->getLikeTypeId($type),
        ])->delete();

        app(LikeCounterContract::class)->where([
            'likeable_id' => $likeable->getKey(),
            'likeable_type' => $likeable->getMorphClass(),
            'type_id' => $this->getLikeTypeId($type),
        ])->delete();
    }
public function removeModelLikes ( LikeableContract $ likeable , $ type ) { app ( LikeContract :: class ) -> where ( [ 'likeable_id' => $ likeable -> getKey ( ) , 'likeable_type' => $ likeable -> getMorphClass ( ) , 'type_id' => $ this -> getLikeTypeId ( $ type ) , ] ) -> delete ( ) ; app ( LikeCounterContract :: class ) -> where ( [ 'likeable_id' => $ likeable -> getKey ( ) , 'likeable_type' => $ likeable -> getMorphClass ( ) , 'type_id' => $ this -> getLikeTypeId ( $ type ) , ] ) -> delete ( ) ; }
Remove all likes from likeable model.

@param \Cog\Likeable\Contracts\Likeable $likeable
@param string $type
@return void

@throws \Cog\Likeable\Exceptions\LikeTypeInvalidException
Remove all likes from likeable model .