src/Traits/Likeable.php
public function like($userId = null)
    {
        app(LikeableServiceContract::class)->addLikeTo($this, LikeType::LIKE, $userId);
    }
public function like($userId = null)
    {
        app(LikeableServiceContract::class)->addLikeTo($this, LikeType::LIKE, $userId);
    }
public function like ( $ userId = null ) { app ( LikeableServiceContract :: class ) -> addLikeTo ( $ this , LikeType :: LIKE , $ userId ) ; }
Add a like for model by the given user.

@param mixed $userId If null will use currently logged in user.
@return void

@throws \Cog\Likeable\Exceptions\LikerNotDefinedException
Add a like for model by the given user .