public function subscribed($subscription = 'default', $planId = null)
    {
        $subscription = $this->subscription($subscription);

        if (is_null($subscription)) {
            return false;
        }

        if (is_null($planId)) {
            return $subscription->isActive();
        }

        if ($planId == $subscription->plan_id and $subscription->isActive()) {
            return true;
        }

        return false;
    }
public function subscribed($subscription = 'default', $planId = null)
    {
        $subscription = $this->subscription($subscription);

        if (is_null($subscription)) {
            return false;
        }

        if (is_null($planId)) {
            return $subscription->isActive();
        }

        if ($planId == $subscription->plan_id and $subscription->isActive()) {
            return true;
        }

        return false;
    }
public function subscribed ( $ subscription = 'default' , $ planId = null ) { $ subscription = $ this -> subscription ( $ subscription ) ; if ( is_null ( $ subscription ) ) { return false ; } if ( is_null ( $ planId ) ) { return $ subscription -> isActive ( ) ; } if ( $ planId == $ subscription -> plan_id and $ subscription -> isActive ( ) ) { return true ; } return false ; }
Check if the user has a given subscription.

@param  string $subscription
@param  int $planId
@return bool
Check if the user has a given subscription .