src/Likeable.php
public function liked($userId=null)
	{
		if(is_null($userId)) {
			$userId = $this->loggedInUserId();
		}
		
		return (bool) $this->likes()
			->where('user_id', '=', $userId)
			->count();
	}
public function liked($userId=null)
	{
		if(is_null($userId)) {
			$userId = $this->loggedInUserId();
		}
		
		return (bool) $this->likes()
			->where('user_id', '=', $userId)
			->count();
	}
public function liked ( $ userId = null ) { if ( is_null ( $ userId ) ) { $ userId = $ this -> loggedInUserId ( ) ; } return ( bool ) $ this -> likes ( ) -> where ( 'user_id' , '=' , $ userId ) -> count ( ) ; }
Has the currently logged in user already "liked" the current object

@param string $userId
@return boolean
Has the currently logged in user already liked the current object